Skip to content

Commit 4542bc4

Browse files
committed
PEP8 format
1 parent d01334f commit 4542bc4

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

osinfo.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,31 @@
55
# Version : 1.0
66

77
# Modification 1 : Changed the profile to list again. Order is important. Everytime we run script we don't want to see different ordering.
8-
# Modification 2 : Fixed the AttributeError checking for all properties. Using hasttr().
9-
# Modification 3 : Removed ': ' from properties inside profile.
8+
# Modification 2 : Fixed the AttributeError checking for all properties. Using hasttr().
9+
# Modification 3 : Removed ': ' from properties inside profile.
1010

1111

1212
# Description : Displays some information about the OS you are running this script on
1313

1414
import platform as pl
1515

1616
profile = [
17-
'architecture',
18-
'linux_distribution',
19-
'mac_ver',
20-
'machine',
21-
'node',
22-
'platform',
23-
'processor',
24-
'python_build',
25-
'python_compiler',
26-
'python_version',
27-
'release',
28-
'system',
29-
'uname',
30-
'version',
31-
]
17+
'architecture',
18+
'linux_distribution',
19+
'mac_ver',
20+
'machine',
21+
'node',
22+
'platform',
23+
'processor',
24+
'python_build',
25+
'python_compiler',
26+
'python_version',
27+
'release',
28+
'system',
29+
'uname',
30+
'version',
31+
]
32+
3233

3334
class bcolors:
3435
HEADER = '\033[95m'
@@ -41,8 +42,7 @@ class bcolors:
4142
UNDERLINE = '\033[4m'
4243

4344

44-
4545
for key in profile:
46-
if hasattr(pl,key):
47-
print(key + bcolors.BOLD + ": "+ str(getattr(pl,key)())+ bcolors.ENDC)
48-
46+
if hasattr(pl, key):
47+
print(key + bcolors.BOLD + ": " + str(getattr(pl, key)()) + bcolors.ENDC)
48+

0 commit comments

Comments
 (0)