You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if __name__ == "__main__":
sys.exit(0 if main() else 1)
which works only if calling main.py directly.
For the installed wacz script to return 0, we really should have the main() function itself return 0 if success, non-zero if error.
Currently, it returns true if success/valid, false otherwise.
Or, can wrap it in another function that is used by the setup.py wacz script, that may be simpler, but also less consistent.
In the end, it probably makes sense to be able to have:
if main['validate', '-f', 'file.wacz'] == 0:
print('success!')
since that's close to what it would be in a shell script also..
The text was updated successfully, but these errors were encountered:
We now have the 0 return code in:
which works only if calling
main.py
directly.For the installed
wacz
script to return 0, we really should have themain()
function itself return 0 if success, non-zero if error.Currently, it returns true if success/valid, false otherwise.
Or, can wrap it in another function that is used by the setup.py wacz script, that may be simpler, but also less consistent.
In the end, it probably makes sense to be able to have:
since that's close to what it would be in a shell script also..
The text was updated successfully, but these errors were encountered: