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:
|
try:
|
||||||
outlook = parser.parse(fh.read())
|
outlook = parser.parse(fh.read())
|
||||||
|
|
||||||
|
if not args.dry_run:
|
||||||
db.add(outlook)
|
db.add(outlook)
|
||||||
|
|
||||||
for probability in outlook.probabilities:
|
for probability in outlook.probabilities:
|
||||||
|
@ -46,4 +47,5 @@ for path in args.path:
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
||||||
db.commit()
|
if not args.dry_run:
|
||||||
|
db.commit()
|
||||||
|
|
Loading…
Add table
Reference in a new issue