diff options
author | René 'Necoro' Neumann <necoro@necoro.net> | 2009-10-23 23:47:05 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.net> | 2009-10-23 23:47:05 +0200 |
commit | c9190e0f9e1969607be5ddf2c59cd2d75b12bdc0 (patch) | |
tree | 56fb42723b64ef126bc01caf306c7a75f780516b | |
parent | ce9d81ac44d0a915ba23d5a032cede1bde321729 (diff) | |
download | portato-c9190e0f9e1969607be5ddf2c59cd2d75b12bdc0.tar.gz portato-c9190e0f9e1969607be5ddf2c59cd2d75b12bdc0.tar.bz2 portato-c9190e0f9e1969607be5ddf2c59cd2d75b12bdc0.zip |
Turn new_version plugin from a mess into sth useful.
Diffstat (limited to '')
-rw-r--r-- | plugins/new_version.py | 18 | ||||
-rw-r--r-- | portato/constants.py | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/plugins/new_version.py b/plugins/new_version.py index 7f110b5..0256520 100644 --- a/plugins/new_version.py +++ b/plugins/new_version.py @@ -34,25 +34,25 @@ class NewVersionFinder(WidgetPlugin): def get_notify_callback (self, rev): def callback(): - get_listener().send_notify( - base = "New Portato Live Version Found", - descr = "The most recent revision is %s." % rev, - icon = APP_ICON) - return False + get_listener().send_notify( + base = "New Portato Live Version Found", + descr = "The most recent revision is %s." % rev, + icon = APP_ICON) + return False - return callback + return callback def find_version (self, rev): repo, branch = REPOURI.split('::') - remote_rev = Popen(['git', 'ls-remote', repo, branch], stdout = PIPE).communicate()[0].split('\t') + remote_rev = Popen(['git', 'ls-remote', repo, branch], stdout = PIPE).communicate()[0].strip().split('\t') if len(remote_rev) and remote_rev[1] not in (branch, 'refs/heads/'+branch, 'refs/tags/'+branch): warning('NEW_VERSION :: Returned revision information looks strange: %s', str(remote_rev)) else: remote_rev = remote_rev[0] - debug("NEW_VERSION :: Installed rev: %s - Current rev: %s", rev, remove_rev) + debug("NEW_VERSION :: Installed rev: %s - Current rev: %s", rev, remote_rev) if rev != remote_rev: gobject.idle_add(self.get_notify_callback(remote_rev)) @@ -82,4 +82,4 @@ class NewVersionFinder(WidgetPlugin): if rev is not None: gobject.timeout_add(30*60*1000, self.start_thread, rev) # call it every 30 minutes -register(NewVersionFinder, REVISION != '') +register(NewVersionFinder, REVISION == '') diff --git a/portato/constants.py b/portato/constants.py index 139f1a6..bce15d2 100644 --- a/portato/constants.py +++ b/portato/constants.py @@ -72,5 +72,5 @@ SETTINGS_DIR = pjoin(HOME, "."+APP) TEMPLATE_DIR = "portato/gui/templates/" # live versions only -REPOURI = "git://github.com/Necoro/portato.git" +REPOURI = "git://github.com/Necoro/portato.git::master" REVISION = "" |