diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-02 14:55:11 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2012-02-02 14:55:11 +0100 |
commit | fdce6479b90dbeef5ca1857b58e6a37ec21978fd (patch) | |
tree | 27c86550345ffecebae49cdbb07b6699b9113d13 /Locker.py | |
parent | 9981f9f6a2205ed56f16989b590d939d5dac974a (diff) | |
download | pylock-fdce6479b90dbeef5ca1857b58e6a37ec21978fd.tar pylock-fdce6479b90dbeef5ca1857b58e6a37ec21978fd.zip |
Added logout function
Diffstat (limited to 'Locker.py')
-rw-r--r-- | Locker.py | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -50,3 +50,10 @@ class Locker(object): self.locked = False GLib.timeout_add_seconds(1, self._checkLock) + + def _canLogout(self): + return (self.locked and self.doLogout is not None and self.currentLogoutTimeout <= 0) + + def logout(self): + if self._canLogout(): + self.doLogout() |