[svn-commits] pabelanger: branch pabelanger/ast_version r3020 - /asterisk/team/pabelanger/a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jan 26 16:55:51 CST 2012


Author: pabelanger
Date: Thu Jan 26 16:55:47 2012
New Revision: 3020

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=3020
Log:
Comments for russellb

Modified:
    asterisk/team/pabelanger/ast_version/lib/python/asterisk/version.py

Modified: asterisk/team/pabelanger/ast_version/lib/python/asterisk/version.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/ast_version/lib/python/asterisk/version.py?view=diff&rev=3020&r1=3019&r2=3020
==============================================================================
--- asterisk/team/pabelanger/ast_version/lib/python/asterisk/version.py (original)
+++ asterisk/team/pabelanger/ast_version/lib/python/asterisk/version.py Thu Jan 26 16:55:47 2012
@@ -27,14 +27,11 @@
     """
     ast_version = ''
 
-    def __init__(self, version=None, path=None):
+    def __init__(self, version=None):
         """Construct an Asterisk Version parser.
 
         Keyword Arguments:
         version -- The Asterisk version string to parse.
-        path -- If an Asterisk version string is not directly provided, look
-        for a version.h file in this location that will contain the Asterisk
-        version string to pull out and Parse.
         """
         self.svn = False
 
@@ -49,13 +46,15 @@
                 process = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                         stderr=subprocess.STDOUT)
             except OSError:
+                print "Failed to execute command: %s" % str(cmd)
                 return
 
             try:
-                for l in process.stdout.readlines():
-                    AsteriskVersion.ast_version += l
+                AsteriskVersion.ast_version = process.stdout.read()
             except OSError:
-                pass
+                print "Failed to execute command: %s" % str(cmd)
+                return
+
             AsteriskVersion.ast_version = AsteriskVersion.ast_version.replace("Asterisk ", "")
             self.version_str = AsteriskVersion.ast_version
 




More information about the svn-commits mailing list