Update upload-file.py

This commit is contained in:
yakamok
2018-09-24 15:16:47 +02:00
committed by GitHub
parent 3bbb95f87b
commit 30f00c2114
-2
View File
@@ -49,8 +49,6 @@ with open(file_to_upload, 'rb') as infile:
i = 0 i = 0
for x in chunk_list: for x in chunk_list:
new_uid = str(i) + "@" + base64.b64encode(x) new_uid = str(i) + "@" + base64.b64encode(x)
#below you need to use --batch so you only have to type the password in once,
#could not get --passphrase to work for some reason
p = subprocess.Popen("gpg2 --batch --pinentry-mode=loopback --passphrase " + passphrase\ p = subprocess.Popen("gpg2 --batch --pinentry-mode=loopback --passphrase " + passphrase\
+ " --quick-add-uid " + email + " " + new_uid, shell=True, stdout=subprocess.PIPE) + " --quick-add-uid " + email + " " + new_uid, shell=True, stdout=subprocess.PIPE)
out, err = p.communicate() out, err = p.communicate()