[asterisk-bugs] [JIRA] (ASTERISK-21371) fails to parse irregular version strings (such as ~dfsg)

Rusty Newton (JIRA) noreply at issues.asterisk.org
Mon Apr 1 19:48:02 CDT 2013


Rusty Newton created ASTERISK-21371:
---------------------------------------

             Summary: fails to parse irregular version strings (such as ~dfsg)
                 Key: ASTERISK-21371
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21371
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Tests/testsuite
            Reporter: Tzafrir Cohen


I try running the testsuite with the following Asterisk version:

1.8.13.1~dfsg-2

I get the following error:

./runtests.py -v 1.8.13.1
Traceback (most recent call last):
  File "./runtests.py", line 27, in <module>
    from asterisk.TestConfig import Dependency, TestConfig
  File "lib/python/asterisk/TestConfig.py", line 86, in <module>
    class Dependency:
  File "lib/python/asterisk/TestConfig.py", line 93, in Dependency
    __ast = Asterisk()
  File "lib/python/asterisk/asterisk.py", line 187, in __init__
    self.ast_version = AsteriskVersion()
  File "lib/python/asterisk/version.py", line 58, in __init__
    self.parent) = self._parse_version_string(self.raw_version)
  File "lib/python/asterisk/version.py", line 125, in _parse_version_string
    (parsed_numbers, handled) = self._parse_version(token)
  File "lib/python/asterisk/version.py", line 168, in _parse_version
    parsed_numbers[count] = int(token)
ValueError: invalid literal for int() with base 10: '1~dfsg'

Note that using -v explicitly (as I used here) is still not good enough as the version string is prsed before -v is in effect.

My workaround (which I will attach here) is to fix the parsing so that '~dfsg' would be considered a "feature" string. But I don't suppose this is something you'd like to include.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list