From 113c93d27b937b32a2822e831e00164e285b4b57 Mon Sep 17 00:00:00 2001 From: Josh Washburne Date: Fri, 5 Jan 2018 10:41:24 -0500 Subject: [PATCH] Code cleanup. --- savepointradio/radio/management/commands/importradio.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/savepointradio/radio/management/commands/importradio.py b/savepointradio/radio/management/commands/importradio.py index 492679d..9cac9d0 100644 --- a/savepointradio/radio/management/commands/importradio.py +++ b/savepointradio/radio/management/commands/importradio.py @@ -17,10 +17,7 @@ def convert_decimal(s): return Decimal(s.decode('utf8')) -# Register the adapter sqlite3.register_adapter(Decimal, adapt_decimal) - -# Register the converter sqlite3.register_converter("decimal", convert_decimal) @@ -40,9 +37,9 @@ class Command(BaseCommand): total_songs = 0 total_jingles = 0 + detect_types = sqlite3.PARSE_DECLTYPES | sqlite3.PARSE_COLNAMES con = sqlite3.connect(options['sqlite3_db_file'][0], - detect_types=sqlite3.PARSE_DECLTYPES | - sqlite3.PARSE_COLNAMES) + detect_types=detect_types) cur = con.cursor() # Fetching albums first