← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~hjd/widelands/minor-python-fix into lp:widelands

 

Hans Joachim Desserud has proposed merging lp:~hjd/widelands/minor-python-fix into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~hjd/widelands/minor-python-fix/+merge/91578

Removes an unreachable line in the detect_revison script. Also adds spaces after commas in a couple of places.
-- 
https://code.launchpad.net/~hjd/widelands/minor-python-fix/+merge/91578
Your team Widelands Developers is requested to review the proposed merge of lp:~hjd/widelands/minor-python-fix into lp:widelands.
=== modified file 'utils/detect_revision.py'
--- utils/detect_revision.py	2011-05-01 16:14:21 +0000
+++ utils/detect_revision.py	2012-02-05 14:34:21 +0000
@@ -20,7 +20,7 @@
 except ImportError:
     __has_bzrlib = False
 
-base_path = p.abspath(p.join(p.dirname(__file__),p.pardir))
+base_path = p.abspath(p.join(p.dirname(__file__), p.pardir))
 
 def detect_debian_version():
     """
@@ -39,8 +39,8 @@
     if m == None:
         return None
     version = version[m.start():m.end()]
-    version = string.replace(version,'+','[',1)
-    version = string.replace(version,'+',']',1)
+    version = string.replace(version, '+', '[', 1)
+    version = string.replace(version, '+', ']', 1)
     return version
 
 
@@ -89,7 +89,7 @@
             nick = run_bzr("nick")
         except OSError:
             return None
-    return "bzr%s[%s] " % (revno,nick)
+    return "bzr%s[%s] " % (revno, nick)
 
 def detect_revision():
     for func in (
@@ -103,9 +103,6 @@
 
     return 'REVDETECT-BROKEN-PLEASE-REPORT-THIS'
 
-
-    return revstring
-
 if __name__ == "__main__":
     print(detect_revision())
 


Follow ups