Minor changes
This commit is contained in:
parent
9db4d763ec
commit
382368d58d
2 changed files with 3 additions and 2 deletions
|
|
@ -166,8 +166,8 @@ class Functions:
|
||||||
|
|
||||||
return [return_code, output]
|
return [return_code, output]
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return [-99, e]
|
|
||||||
Functions.log(source, Functions.ERROR, "%s" % e)
|
Functions.log(source, Functions.ERROR, "%s" % e)
|
||||||
|
return [-99, e]
|
||||||
|
|
||||||
|
|
||||||
class Consts:
|
class Consts:
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ def test_functions_run_command_not_found():
|
||||||
return_result=False)
|
return_result=False)
|
||||||
assert return_code == -99
|
assert return_code == -99
|
||||||
assert str(result) == "[Errno 2] No such file or directory: 'no_command_here'"
|
assert str(result) == "[Errno 2] No such file or directory: 'no_command_here'"
|
||||||
assert len(Functions.debug_log) == 0
|
assert len(Functions.debug_log) == 1
|
||||||
|
assert re.match("\[EASYHAPROXY\] .* \[ERROR\]: \[Errno 2\] No such file or directory: 'no_command_here'", Functions.debug_log[0])
|
||||||
finally:
|
finally:
|
||||||
Functions.debug_log = None
|
Functions.debug_log = None
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue