Skip to content

Commit

Permalink
[#2] πŸ› don't decode results, just print bytes directly
Browse files Browse the repository at this point in the history
  • Loading branch information
derwentx committed Apr 19, 2020
1 parent 4d10d40 commit 6a1bcb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shazam-tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
raise UserWarning("Could not find Shazam Database")

connection = sqlite3.connect(db_path)
connection.text_factory = lambda x: x
cursor = connection.cursor()
results = cursor.execute(
'''
Expand All @@ -32,6 +33,6 @@
)

for result in results:
print '{0} - {1}'.format(result[0], result[1])
print b'{0} - {1}'.format(result[0], result[1])

connection.close()

0 comments on commit 6a1bcb7

Please sign in to comment.