add clearer comment
This commit is contained in:
parent
7a666ca03b
commit
09bce24b11
1 changed files with 3 additions and 2 deletions
|
@ -130,8 +130,9 @@ def get_os_info():
|
||||||
for distro_name in distro_info:
|
for distro_name in distro_info:
|
||||||
path_to_file = distro_info[distro_name]
|
path_to_file = distro_info[distro_name]
|
||||||
if os.path.exists(path_to_file):
|
if os.path.exists(path_to_file):
|
||||||
if os.access(path_to_file, os.X_OK): # is the file executable?
|
if os.access(path_to_file, os.X_OK):
|
||||||
# yes, then run it and get output. (CRUX ONLY ATM)
|
# the file is executable (f.e. CRUX)
|
||||||
|
# yes, then run it and get the first line of output.
|
||||||
text = helpers.get_output_of_command(path_to_file)[0]
|
text = helpers.get_output_of_command(path_to_file)[0]
|
||||||
else:
|
else:
|
||||||
fd = open(path_to_file)
|
fd = open(path_to_file)
|
||||||
|
|
Loading…
Add table
Reference in a new issue