[asterisk-commits] pabelanger: branch pabelanger/sipp r1127 - /asterisk/team/pabelanger/sipp/lib...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Dec 9 17:03:45 CST 2010
Author: pabelanger
Date: Thu Dec 9 17:03:41 2010
New Revision: 1127
URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=1127
Log:
Another logic fix
Modified:
asterisk/team/pabelanger/sipp/lib/python/sipp/version.py
Modified: asterisk/team/pabelanger/sipp/lib/python/sipp/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/sipp/lib/python/sipp/version.py?view=diff&rev=1127&r1=1126&r2=1127
==============================================================================
--- asterisk/team/pabelanger/sipp/lib/python/sipp/version.py (original)
+++ asterisk/team/pabelanger/sipp/lib/python/sipp/version.py Thu Dec 9 17:03:41 2010
@@ -29,20 +29,22 @@
self.version_str = ""
if version is None:
sipp = utils.which("sipp")
- if sipp:
- cmd = [
- sipp, "-v"
- ]
- try:
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
- except OSError:
- return
- for line in p.stdout:
- if line.strip().startswith('SIPp'):
- ver = line.strip().lstrip('SIPp ')
- ver = ver.split(',', 1)
- self.version_str = ver[0]
+ if sipp is None:
+ return
+
+ cmd = [
+ sipp, "-v"
+ ]
+ try:
+ p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ stderr=subprocess.STDOUT)
+ except OSError:
+ return
+ for line in p.stdout:
+ if line.strip().startswith('SIPp'):
+ ver = line.strip().lstrip('SIPp ')
+ ver = ver.split(',', 1)
+ self.version_str = ver[0]
else:
self.version_str = version
More information about the asterisk-commits
mailing list