Fix in shell_command for get return code
This commit is contained in:
parent
ac09f67cde
commit
dfadd0b433
2 changed files with 6 additions and 4 deletions
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/epython3
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import distro
|
||||
|
|
@ -8,8 +8,10 @@ import json
|
|||
|
||||
def shell_command(command):
|
||||
|
||||
if call(command, shell=True) > 0:
|
||||
print('Error: cannot execute command '+command+"\n\n")
|
||||
return_call=call(command, shell=True)
|
||||
|
||||
if return_call> 0:
|
||||
print('Error: cannot execute command '+command+' with return code '+str(return_call)+'\n\n"')
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ build-backend = "flit_core.buildapi"
|
|||
name = "pastafariutils"
|
||||
authors = [{name = "Antonio de la Rosa", email = "antonio.delarosa@salirdelhoyo.com"}]
|
||||
readme = "README.md"
|
||||
version = "0.76.1"
|
||||
version = "0.76.2"
|
||||
description = "Utils for make *nix scripts."
|
||||
# dynamic = ["version", "description"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue