Ensure --dry-run flag is honored
This commit is contained in:
parent
9f269b1aa6
commit
e514129d06
1 changed files with 10 additions and 8 deletions
|
@ -26,6 +26,7 @@ for path in args.path:
|
|||
try:
|
||||
outlook = parser.parse(fh.read())
|
||||
|
||||
if not args.dry_run:
|
||||
db.add(outlook)
|
||||
|
||||
for probability in outlook.probabilities:
|
||||
|
@ -46,4 +47,5 @@ for path in args.path:
|
|||
else:
|
||||
raise
|
||||
|
||||
db.commit()
|
||||
if not args.dry_run:
|
||||
db.commit()
|
||||
|
|
Loading…
Add table
Reference in a new issue