This commit is contained in:
Tim Bentley 2017-08-13 06:50:44 +01:00
parent f436ef2f10
commit 54eae8712a
3 changed files with 3 additions and 4 deletions

View File

@ -141,4 +141,4 @@ def controller_direction_api(request, controller, action):
:param action: the controller slides forward or backward.
"""
controller_direction(request, controller, action)
return {'results': {'success': True}}
return {'results': {'success': True}}

View File

@ -261,9 +261,9 @@ def ping(host):
Returns True if host responds to a ping request
"""
# 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
need_sh = False if platform.system().lower()=="windows" else True
need_sh = False if platform.system().lower() == "windows" else True
# Ping
return subprocess.call(args, shell=need_sh) == 0

View File

@ -112,4 +112,3 @@ def presentations_service(request):
search(request, 'presentations', log)
except NotFound:
return {'results': {'items': []}}