[asterisk-commits] lib/python/asterisk/version: Correct erroneous error message (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jul 12 17:53:23 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: lib/python/asterisk/version: Correct erroneous error message
......................................................................


lib/python/asterisk/version: Correct erroneous error message

The a Git version string is parsed, the handling for the revision
portion incorrectly set 'self.handled' to be True, where the actual
variable being checked is 'handled'. This caused an error message to
erroneously be raised on a version string parsed from an Asterisk Git
checkout. This patch corrects that, and also adds a basicLogger for the
unit tests so that they print out the ERROR message as well.

Change-Id: I3e9bbefe81bf0edc24f0b427a3830bbaec6fbc16
---
M lib/python/asterisk/version.py
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/lib/python/asterisk/version.py b/lib/python/asterisk/version.py
index 0f33959..7cbb9ef 100644
--- a/lib/python/asterisk/version.py
+++ b/lib/python/asterisk/version.py
@@ -213,7 +213,7 @@
                             self.revision = '{0}-{1}'.format(self.revision, token)
                         else:
                             self.revision = token
-                        self.handled = True
+                        handled = True
                     if not handled:
                         LOGGER.error("Unable to parse token '%s' in version "
                                      "string '%s'" % (token, raw_version))
@@ -784,6 +784,7 @@
 
 def main():
     """Run the unit tests"""
+    logging.basicConfig()
     unittest.main()
 
 

-- 
To view, visit https://gerrit.asterisk.org/877
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e9bbefe81bf0edc24f0b427a3830bbaec6fbc16
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list