make script runnable without installation
This commit is contained in:
@@ -129,8 +129,7 @@ Usage
|
|||||||
)
|
)
|
||||||
parser.add_argument("--name", help="Name of the owner of the key", required=False, default="recipient@address")
|
parser.add_argument("--name", help="Name of the owner of the key", required=False, default="recipient@address")
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"-r",
|
"--recursive","-r",
|
||||||
"--recursive",
|
|
||||||
default=False,
|
default=False,
|
||||||
action="store_true",
|
action="store_true",
|
||||||
help="Recursive encryption or decryption. Processes full folder structures",
|
help="Recursive encryption or decryption. Processes full folder structures",
|
||||||
@@ -277,6 +276,8 @@ class Processor:
|
|||||||
d = self.gpg.decrypt_file(fp, passphrase=self.phrase, always_trust=True)
|
d = self.gpg.decrypt_file(fp, passphrase=self.phrase, always_trust=True)
|
||||||
if not d.ok:
|
if not d.ok:
|
||||||
print(d.status, file=sys.stderr)
|
print(d.status, file=sys.stderr)
|
||||||
|
if os.path.exists(out_file):
|
||||||
|
os.unlink(out_file)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
if os.path.exists(out_file):
|
if os.path.exists(out_file):
|
||||||
os.unlink(out_file)
|
os.unlink(out_file)
|
||||||
|
|||||||
Reference in New Issue
Block a user