[pitivi] application: Fix version check when running a version newer than what's online
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] application: Fix version check when running a version newer than what's online
- Date: Thu, 20 Mar 2014 16:41:24 +0000 (UTC)
commit 965f0a10e753c34a23abdd98ffefeef8ac319c6e
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Thu Mar 20 12:41:05 2014 -0400
application: Fix version check when running a version newer than what's online
pitivi/application.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/application.py b/pitivi/application.py
index 441df6e..5b1fcad 100644
--- a/pitivi/application.py
+++ b/pitivi/application.py
@@ -204,7 +204,12 @@ class Pitivi(Loggable, Signallable):
current_version = version
self.info("Latest software version is %s", current_version)
- if status is "UNSUPPORTED":
+ # Python is magical... comparing version *strings* always works,
+ # even with different major.minor.nano version number schemes!
+ if VERSION > current_version:
+ status = "CURRENT"
+ self.info("Running version %s, which is newer than the latest known version. Considering it
as the latest current version.", VERSION)
+ elif status is "UNSUPPORTED":
self.warning("Using an outdated version of Pitivi (%s)", VERSION)
self._version_information["current"] = current_version
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]