I'm trying to decrypt a file with a gpg executable on a windows 2012 server. Currently the script accesses the 'try' block but then stays there indefinitely. The file is roughly 500mb in size so anything it should take < 10min to decrypt. The longest I've let it run for is an hour. Here is the code for this:
# decrypt the pgp file
comm = (gpg + ' --batch --passphrase passphrase --homedir='+current_path
+' -o ' + zip_name +' --decrypt ' + file_name)
try:
subp = subprocess.check_call(comm, stdout=PIPE, stdin=PIPE, stderr=STDOUT)
stdout_data, stderr_data = subp.communicate()
print stdout_data, stderr_data
except subprocess.CalledProcessError as e:
print e.output
logger.update('Error', process, runtime=0, error=e)
raise Exception('Error Decrypting File')
Not included, but the key has been imported.
Is there anything I can add/remove or do differently to 1) get a better idea of what's going on within the host system (the windows server) and 2) to not run indefinitely and report back useful information as to why it was running indefinitely.
Let me know if any clarification is needed.