Skip to content

Commit

Permalink
Merge branch '2.4.4' of ssh://git.tasktools.org/tm/task into 2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
pbeckingham committed May 10, 2015
2 parents 5d5e824 + 92b5dfd commit 0d45bb7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/add-ons/export-sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
Example usage::
$ ./export-sql.py | sqlite3 mytasks.db
$ PYTHONIOENCODING=UTF-8 ./export-sql.py | sqlite3 mytasks.db
$ /usr/bin/sqlite3 mytasks.db "select * from annotations;"
This script has only been tested with sqlite3, but in theory, it could be
Expand Down Expand Up @@ -120,8 +120,8 @@ def make_annotation(annot):
values = template.format(**annot)
return "INSERT INTO \"annotations\" VALUES(%s)" % values

template = "{uuid}, {description}, {entry}, {end}, " + \
"{priority}, {project}, {status}"
template = u"{uuid}, {description}, {entry}, {end}, " + \
u"{priority}, {project}, {status}"

nullables = ['end', 'priority', 'project', 'status']
defaults = dict([(key, None) for key in nullables])
Expand Down Expand Up @@ -162,7 +162,7 @@ def main():
sql = table_definitions + ";\n".join(lines) + ';'

# Print them out, decorated with sqlite3 trappings
print """
print u"""
BEGIN TRANSACTION;
{sql}
COMMIT;""".format(sql=sql)
Expand Down

0 comments on commit 0d45bb7

Please sign in to comment.