Skip to content

Commit

Permalink
let '-q' silence unknown warnings import with -i
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Nov 29, 2014
1 parent 2f6cae1 commit 10e132f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TradeDangerous, Copyright (C) Oliver "kfsone" Smith, July 2014
==============================================================================

v6.1.2 Nov 28 2014
. (kfsone) '-q' now silences "unknown ..." warnings when importing with "-i"
. (gazelle) Improvements to .CSV file handling,
. (gazelle) Additional stations, data cleanup, etc.
. (kfsone) Fix for importing data without demand/supply
Expand Down
9 changes: 6 additions & 3 deletions cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ def changeStation(matches):
if not tdenv.ignoreUnknown:
raise ex
stationID = DELETED
print(ex)
if not tdenv.quiet:
print(ex)
return

# Check for duplicates
Expand Down Expand Up @@ -432,7 +433,8 @@ def changeCategory(matches):
ex = UnknownCategoryError(priceFile, lineNo, categoryName)
if not tdenv.ignoreUnknown:
raise ex
print(ex)
if not tdenv.quiet:
print(ex)
categoryID = DELETED
return

Expand Down Expand Up @@ -476,7 +478,8 @@ def processItemLine(matches):
ex = UnknownItemError(priceFile, lineNo, itemName)
if not tdenv.ignoreUnknown:
raise ex
print(ex)
if not tdenv.quiet:
print(ex)
return

# Check for duplicate items within the station.
Expand Down

0 comments on commit 10e132f

Please sign in to comment.