Skip to content

Commit 20be870

Browse files
fix : autopep8 #35
1 parent 01f3ffd commit 20be870

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

orangetool/orangetool_ip.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def mac(debug=False):
181181
print(str(e))
182182
return GENERAL_ERROR_MESSAGE
183183

184+
184185
def network_control(command, device="eth0", debug=False):
185186
"""
186187
Control network adaptor.
@@ -198,7 +199,7 @@ def network_control(command, device="eth0", debug=False):
198199
if command == "down":
199200
cmd = "down"
200201
output = sub.Popen(["ifconfig", device, cmd],
201-
stderr=sub.PIPE, stdin=sub.PIPE, stdout=sub.PIPE)
202+
stderr=sub.PIPE, stdin=sub.PIPE, stdout=sub.PIPE)
202203
if len(output[0]) == 0 and len(output[1]) == 0:
203204
return True
204205
return False
@@ -207,6 +208,7 @@ def network_control(command, device="eth0", debug=False):
207208
print(str(e))
208209
return GENERAL_ERROR_MESSAGE
209210

211+
210212
def network_enable(device="eth0", debug=False):
211213
"""
212214
Shortcut to enable network adaptor.
@@ -217,7 +219,8 @@ def network_enable(device="eth0", debug=False):
217219
:type debug:bool
218220
:return: True in successful and False otherwise
219221
"""
220-
return network_control("up",device=device,debug=debug)
222+
return network_control("up", device=device, debug=debug)
223+
221224

222225
def network_disable(device="eth0", debug=False):
223226
"""

orangetool/orangetool_system.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def wakeup(day=0, hour=0, minute=0, sync=True, debug=False):
129129
try:
130130
if sync:
131131
_ = sub.Popen(
132-
["hwclock","-w"],
132+
["hwclock", "-w"],
133133
stderr=sub.PIPE,
134134
stdout=sub.PIPE,
135135
stdin=sub.PIPE)

0 commit comments

Comments
 (0)