Skip to content

Commit

Permalink
Convert 'export' to use NOTE where where relevant
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Smith committed Jan 10, 2015
1 parent aa88b9f commit 1d11459
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions commands/export_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ def run(results, cmdenv, tdb):
raise CommandLineError("Save location '{}' not found.".format(str(exportPath)))

# connect to the database
if not cmdenv.quiet:
print("Using database '{}'".format(tdb.dbFilename))
cmdenv.NOTE("Using database '{}'", tdb.dbPath)
conn = tdb.getDB()
conn.row_factory = sqlite3.Row

Expand Down Expand Up @@ -114,12 +113,10 @@ def run(results, cmdenv, tdb):
tableName = row['name']
if tableName in ignoreList:
# ignore the table
if not cmdenv.quiet:
print("Ignore Table '{table}'".format(table=tableName))
cmdenv.NOTE("Ignore Table '{table}'", table=tableName)
continue

if not cmdenv.quiet:
print("Export Table '{table}'".format(table=tableName))
cmdenv.NOTE("Export Table '{table}'", table=tableName)

# create CSV files
lineCount, filePath = exportTableToFile(tdb, cmdenv, tableName, exportPath)
Expand All @@ -128,4 +125,4 @@ def run(results, cmdenv, tdb):
filePath.unlink()
cmdenv.DEBUG0("Delete empty file {file}'".format(file=filePath))

return None
return None

0 comments on commit 1d11459

Please sign in to comment.