Skip to content

Commit

Permalink
temporary fix for #2
Browse files Browse the repository at this point in the history
  • Loading branch information
NandanDesai committed Apr 19, 2020
1 parent dd5ff4c commit d8c6019
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ echo "Installing dependencies "
sudo pip2 install -r requirements.txt
pyinstaller --onefile torghost.py
sudo cp -r dist/torghost /usr/bin/
echo "TorGhost has been built and installed successfully!"
echo "Done."
15 changes: 10 additions & 5 deletions torghost.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,15 @@ def check_root():
sys.exit(0)


notify2.init("TorGhost")
n = notify2.Notification(None)
n.set_urgency(notify2.URGENCY_NORMAL)
n.set_timeout(10000)
try:
notify2.init("TorGhost")
n = notify2.Notification(None)
n.set_urgency(notify2.URGENCY_NORMAL)
n.set_timeout(10000)
except:
# To-Do: log the error
# print t() + bcolors.RED + " Error displaying the notifications. [can be ignored]" + bcolors.ENDC
pass


def notify(text):
Expand All @@ -126,7 +131,7 @@ def notify(text):
n.show()
except:
# ignore if any notification related errors
return
pass


signal.signal(signal.SIGINT, sigint_handler)
Expand Down

0 comments on commit d8c6019

Please sign in to comment.