fix: added relevant error message if file is missing
This commit is contained in:
parent
8c545b27af
commit
e4788b98ca
1 changed files with 6 additions and 2 deletions
8
pass2csv
8
pass2csv
|
@ -98,8 +98,12 @@ def main(store_path, grouping_base, outfile, gpgbinary, use_agent, encodings,
|
|||
gpg = gnupg.GPG(gpgbinary=gpgbinary, use_agent=use_agent)
|
||||
files = path.glob('**/*.gpg')
|
||||
if not path.is_dir():
|
||||
#if store_path[-4:] == '.gpg':
|
||||
files = [path]
|
||||
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)
|
||||
with open(file, 'rb') as fp:
|
||||
|
|
Loading…
Reference in a new issue