replace dash with underscore in os name/version (#7381)
Fixes #7356 In some cases OperatingSystem (e.g. LinuxDistro) was getting instantiated with a version that contains dashes. This breaks because the concretizer later converts this value to a string and re-parses it, and the '-' character is used to separate architecture components. This adds a guard in the initializer to convert '-' to '_'.
This commit is contained in:
parent
869c654c37
commit
f27f20e5b3
1 changed files with 2 additions and 2 deletions
|
@ -240,8 +240,8 @@ class OperatingSystem(object):
|
|||
"""
|
||||
|
||||
def __init__(self, name, version):
|
||||
self.name = name
|
||||
self.version = version
|
||||
self.name = name.replace('-', '_')
|
||||
self.version = str(version).replace('-', '_')
|
||||
|
||||
def __str__(self):
|
||||
return "%s%s" % (self.name, self.version)
|
||||
|
|
Loading…
Reference in a new issue