I have the following issue:
try:
with subprocess.check_call(query):
return 1
except ValueError:
return -1
This code runs a shell script and it's working so far. The script returns 0. Nevertheless I got this error:
with subprocess.check_call(query):
AttributeError: 'int' object has no attribute '__exit__'
so there has to be someting wrong with my try/except block.