fixed gi.notify import
This commit is contained in:
2
w.py
2
w.py
@@ -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))
|
||||
|
Reference in New Issue
Block a user