[Pkg-mozext-commits] [adblock-plus] 237/464: Don't fail build if hg command line tool cannot be found

David Prévot taffit at moszumanska.debian.org
Tue Jul 22 20:44:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 4ba8c0107d2c524ec8a22d5170074b6379b5c1c0
Author: Wladimir Palant <trev at adblockplus.org>
Date:   Fri Jun 8 15:12:58 2012 +0200

    Don't fail build if hg command line tool cannot be found
---
 packager.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/packager.py b/packager.py
index 4f955d4..55b3771 100644
--- a/packager.py
+++ b/packager.py
@@ -79,8 +79,11 @@ def getLocales(baseDir, includeIncomplete=False):
   return locales
 
 def getBuildNum(baseDir):
-  (result, dummy) = subprocess.Popen(['hg', 'id', '-n'], stdout=subprocess.PIPE).communicate()
-  return re.sub(r'\W', '', result)
+  try:
+    (result, dummy) = subprocess.Popen(['hg', 'id', '-n'], stdout=subprocess.PIPE).communicate()
+    return re.sub(r'\W', '', result)
+  except Exception:
+    return '0'
 
 def readMetadata(baseDir):
   metadata = SafeConfigParser()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list