Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

patched get_turnkey_version so that it returns None if it can't find …

…the turnkey_version
  • Loading branch information...
commit b25a8582e7ca5f206e214cdc38b7b79430f29af9 1 parent 1b1eac5
@lirazsiri lirazsiri authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 version.py
View
9 version.py
@@ -9,7 +9,7 @@
# the License, or (at your option) any later version.
#
import re
-from executil import getoutput
+import executil
class Error(Exception):
pass
@@ -18,7 +18,12 @@ def get_turnkey_version():
try:
return file("/etc/turnkey_version").readline().strip()
except:
- return getoutput("turnkey-version")
+ pass
+
+ try:
+ return executil.getoutput("turnkey-version")
+ except executil.ExecError:
+ return None
def codename(version):
m = re.match(r'turnkey-(.*?)-([\d\.]+|beta)', version)
Please sign in to comment.
Something went wrong with that request. Please try again.