summaryrefslogtreecommitdiffstats
path: root/Lib/platform.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/platform.py')
-rwxr-xr-xLib/platform.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/platform.py b/Lib/platform.py
index 0a52587..570f327 100755
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -261,6 +261,12 @@ _supported_dists = (
def _parse_release_file(firstline):
+ # Default to empty 'version' and 'id' strings. Both defaults are used
+ # when 'firstline' is empty. 'id' defaults to empty when an id can not
+ # be deduced.
+ version = ''
+ id = ''
+
# Parse the first line
m = _lsb_release_version.match(firstline)
if m is not None:
@@ -278,8 +284,6 @@ def _parse_release_file(firstline):
version = l[0]
if len(l) > 1:
id = l[1]
- else:
- id = ''
return '', version, id
def linux_distribution(distname='', version='', id='',