diff src/tools/utils.py @ 1857:2d2617930f97

core (tools): fixed bad call to "hg id" when hg is not working to guest revision, which was the cause of an Exception
author Goffi <goffi@goffi.org>
date Sun, 28 Feb 2016 01:57:51 +0100
parents d17772b0fe22
children 06e13ae616cf
line wrap: on
line diff
--- a/src/tools/utils.py	Sat Feb 27 14:55:23 2016 +0100
+++ b/src/tools/utils.py	Sun Feb 28 01:57:51 2016 +0100
@@ -80,10 +80,10 @@
             hg_data = {}
         else:
             hg_data = dict(zip(KEYS, hg_data_raw.split('\n')))
-        try:
-            hg_data['modified'] = '+' in subprocess.check_output(["hg","id","-i"])
-        except subprocess.CalledProcessError:
-            pass
+            try:
+                hg_data['modified'] = '+' in subprocess.check_output(["hg","id","-i"])
+            except subprocess.CalledProcessError:
+                pass
     else:
         hg_data = {}