Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix a typo in the libnotify wrapper and improve the API docs.

  • Loading branch information...
commit 6dfeefa4ee6a111993e128c03c70b01b0b0bf92f 1 parent 7fd0f7c
Stephan Sokolow authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 timeclock.py
View
9 timeclock.py
@@ -24,6 +24,8 @@
@todo: Consider:
- Changing this into a Plasma widget
- Using PyKDE's bindings to the KDE Notification system
+
+@newfield appname: Application Name
"""
__appname__ = "The Procrastinator's Timeclock"
@@ -69,8 +71,9 @@
try:
import pynotify
- pynotify.init(__appname___)
+ pynotify.init(__appname__)
def notify_exhaustion(timer_name):
+ """Display a libnotify notification that the given timer has expired."""
notification = pynotify.Notification(
"%s Time Exhausted" % timer_name.title(),
"You have used up your alotted time for %s" % timer_name.lower(),
@@ -78,10 +81,10 @@ def notify_exhaustion(timer_name):
notification.set_urgency(pynotify.URGENCY_NORMAL)
notification.set_timeout(pynotify.EXPIRES_NEVER)
notification.show()
-except:
+except ImportError:
notify_exhaustion = None
-CURRENT_SAVE_VERSION = 2
+CURRENT_SAVE_VERSION = 2 #: Used for save file versioning
class TimeClock:
def __init__(self):
#Set the Glade file
Please sign in to comment.
Something went wrong with that request. Please try again.