Merge pull request #8087 from neersighted/string_version
Fix hostname when get_distribution_version() returns a string.
This commit is contained in:
commit
628d828876
1 changed files with 4 additions and 1 deletions
|
@ -190,8 +190,11 @@ def get_distribution_version():
|
||||||
except:
|
except:
|
||||||
# FIXME: MethodMissing, I assume?
|
# FIXME: MethodMissing, I assume?
|
||||||
distribution_version = platform.dist()[1]
|
distribution_version = platform.dist()[1]
|
||||||
|
if type(distribution_version) == str:
|
||||||
|
distribution_version = 0
|
||||||
else:
|
else:
|
||||||
distribution_version = None
|
distribution_version = 0
|
||||||
|
|
||||||
return distribution_version
|
return distribution_version
|
||||||
|
|
||||||
def load_platform_subclass(cls, *args, **kwargs):
|
def load_platform_subclass(cls, *args, **kwargs):
|
||||||
|
|
Loading…
Reference in a new issue