[asterisk-commits] russell: testsuite/asterisk/trunk r91 - /asterisk/trunk/asteriskversion.py

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Mar 17 17:37:48 CDT 2010


Author: russell
Date: Wed Mar 17 17:37:44 2010
New Revision: 91

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=91
Log:
Clean up __get_ast_version() a bit

Modified:
    asterisk/trunk/asteriskversion.py

Modified: asterisk/trunk/asteriskversion.py
URL: http://svnview.digium.com/svn/testsuite/asterisk/trunk/asteriskversion.py?view=diff&rev=91&r1=90&r2=91
==============================================================================
--- asterisk/trunk/asteriskversion.py (original)
+++ asterisk/trunk/asteriskversion.py Wed Mar 17 17:37:44 2010
@@ -93,16 +93,12 @@
         v = ""
         try:
             f = open(VERSION_HDR, "r")
+            match = re.search("ASTERISK_VERSION\s+\"(.*)\"", f.read())
+            if match is not None:
+                v = match.group(1)
+            f.close()
         except:
             print "Failed to open %s to get Asterisk version." % VERSION_HDR
-            return v
-
-        match = re.search("ASTERISK_VERSION\s+\"(.*)\"", f.read())
-        if match is not None:
-            v = match.group(1)
-
-        f.close()
-
         return v
 
 




More information about the asterisk-commits mailing list