Merge branch 'PrincedelaLune-master'
This commit is contained in:
commit
87a7c45560
1 changed files with 9 additions and 1 deletions
10
pass2csv
10
pass2csv
|
@ -96,7 +96,15 @@ def main(store_path, grouping_base, outfile, gpgbinary, use_agent, encodings,
|
||||||
path = pathlib.Path(store_path)
|
path = pathlib.Path(store_path)
|
||||||
grouping_path = pathlib.Path(grouping_base)
|
grouping_path = pathlib.Path(grouping_base)
|
||||||
gpg = gnupg.GPG(gpgbinary=gpgbinary, use_agent=use_agent)
|
gpg = gnupg.GPG(gpgbinary=gpgbinary, use_agent=use_agent)
|
||||||
for file in path.glob('**/*.gpg'):
|
files = path.glob('**/*.gpg')
|
||||||
|
if not path.is_dir():
|
||||||
|
if path.is_file():
|
||||||
|
files = [path]
|
||||||
|
else:
|
||||||
|
err="No shuch file or directory: {}".format(path)
|
||||||
|
logging.error(err)
|
||||||
|
exit(1)
|
||||||
|
for file in files:
|
||||||
logging.info("Processing %s", file)
|
logging.info("Processing %s", file)
|
||||||
with open(file, 'rb') as fp:
|
with open(file, 'rb') as fp:
|
||||||
decrypted = gpg.decrypt_file(fp)
|
decrypted = gpg.decrypt_file(fp)
|
||||||
|
|
Loading…
Reference in a new issue