fixed gi.notify import

This commit is contained in:
2017-07-19 12:53:43 +00:00
parent b68f8b9bf7
commit ccfc3c535e

2
w.py
View File

@@ -130,6 +130,8 @@ print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
# the part for notification on linux, extra check up for mac
if os.name is "posix" and platform.system() == "Linux":
import gi
gi.require_version('Notify', '0.7')
from gi.repository import Notify
notification_text = (name + "\n" + temperature + " C\n" + str(int(wind) * 3.6) + " km/h\n Conditions: " + str(conditions))