#NEWLINE# def _run_service( self , cmd , service_url = None ) : #NEWLINE# #INDENT# '\n        Runs a service with a specified shell cmd\n        :param service_url:\n        :param cmd: shell command for running the service as a background process\n        :return:\n        ' #NEWLINE# print ( 'running cmd: {}' . format ( cmd ) ) #NEWLINE# if ( ( service_url is not None ) and self . is_up ( service_url ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# Popen_with_delayed_expansion ( cmd , stdout = DEVNULL ) #NEWLINE# if ( ( service_url is not None ) and ( not self . is_up ( cmd , timeout = 10 ) ) ) : #NEWLINE# #INDENT# raise ServiceRunError ( 'Failed to run service on {}.' . format ( service_url ) )