forked from openlp/openlp
pep8
This commit is contained in:
parent
f436ef2f10
commit
54eae8712a
@ -141,4 +141,4 @@ def controller_direction_api(request, controller, action):
|
|||||||
:param action: the controller slides forward or backward.
|
:param action: the controller slides forward or backward.
|
||||||
"""
|
"""
|
||||||
controller_direction(request, controller, action)
|
controller_direction(request, controller, action)
|
||||||
return {'results': {'success': True}}
|
return {'results': {'success': True}}
|
||||||
|
@ -261,9 +261,9 @@ def ping(host):
|
|||||||
Returns True if host responds to a ping request
|
Returns True if host responds to a ping request
|
||||||
"""
|
"""
|
||||||
# Ping parameters as function of OS
|
# Ping parameters as function of OS
|
||||||
ping_str = "-n 1" if platform.system().lower()=="windows" else "-c 1"
|
ping_str = "-n 1" if platform.system().lower() == "windows" else "-c 1"
|
||||||
args = "ping " + " " + ping_str + " " + host
|
args = "ping " + " " + ping_str + " " + host
|
||||||
need_sh = False if platform.system().lower()=="windows" else True
|
need_sh = False if platform.system().lower() == "windows" else True
|
||||||
|
|
||||||
# Ping
|
# Ping
|
||||||
return subprocess.call(args, shell=need_sh) == 0
|
return subprocess.call(args, shell=need_sh) == 0
|
||||||
|
@ -112,4 +112,3 @@ def presentations_service(request):
|
|||||||
search(request, 'presentations', log)
|
search(request, 'presentations', log)
|
||||||
except NotFound:
|
except NotFound:
|
||||||
return {'results': {'items': []}}
|
return {'results': {'items': []}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user