summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@theqtcompany.com>2015-09-23 19:41:54 +0200
committerMichal Klocek <michal.klocek@theqtcompany.com>2015-09-24 14:05:10 +0000
commite93d70402c3bdad383d330a7a669cf43d9548a3d (patch)
tree32aabce8ac1512f6a79644ddbdde391d7f400221 /tools
parent3f0c78f0f688458fa1aac448dcfbb672ed3d066e (diff)
Fix dos2unixVersion error handling in take_snapshot
dos2unix version 6.0.4 do not report version number on stdout, but to stderr, which breaks processing. Assume in that case that we have too old version anyway. Change-Id: Ifc945979a088558593091a8ef6b1a74e07334b66 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/take_snapshot.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py
index 71dcc43c2..e5df2d80b 100755
--- a/tools/scripts/take_snapshot.py
+++ b/tools/scripts/take_snapshot.py
@@ -305,7 +305,10 @@ def exportChromium():
commandNotFound = subprocess.call(['which', 'dos2unix'])
if not commandNotFound:
- dos2unixVersion = StrictVersion(subprocess.Popen(['dos2unix', '-V', '| true'], stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[1])
+ dos2unixVersion , err = subprocess.Popen(['dos2unix', '-V', '| true'], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
+ if not dos2unixVersion:
+ raise Exception("You need dos2unix version 6.0.6 minimum.")
+ dos2unixVersion = StrictVersion(dos2unixVersion.splitlines()[0].split()[1])
if commandNotFound or dos2unixVersion < StrictVersion('6.0.6'):
raise Exception("You need dos2unix version 6.0.6 minimum.")