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:
		| @@ -240,8 +240,8 @@ class OperatingSystem(object): | |||||||
|     """ |     """ | ||||||
|  |  | ||||||
|     def __init__(self, name, version): |     def __init__(self, name, version): | ||||||
|         self.name = name |         self.name = name.replace('-', '_') | ||||||
|         self.version = version |         self.version = str(version).replace('-', '_') | ||||||
|  |  | ||||||
|     def __str__(self): |     def __str__(self): | ||||||
|         return "%s%s" % (self.name, self.version) |         return "%s%s" % (self.name, self.version) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 scheibelp
					scheibelp