changeset 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 d7e29a12ec2c
children 06e13ae616cf
files src/tools/utils.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
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 = {}