Skip to content

Commit

Permalink
chore: Simplify engine_option conversion from list of two-item lists …
Browse files Browse the repository at this point in the history
…to dict
  • Loading branch information
jpmckinney committed Jul 12, 2024
1 parent d6a0233 commit 64eecfc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions csvkit/utilities/sql2csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ def main(self):
if self.additional_input_expected() and not self.args.query:
self.argparser.error('You must provide an input file or piped data.')

engine_option = {i[0]: i[1] for i in self.args.engine_option}

try:
engine = create_engine(self.args.connection_string, **engine_option)
engine = create_engine(self.args.connection_string, **dict(self.args.engine_option))
except ImportError as e:
raise ImportError(
"You don't appear to have the necessary database backend installed for connection string you're "
Expand Down

0 comments on commit 64eecfc

Please sign in to comment.