Skip to content

Commit

Permalink
Merge pull request #40 from uber/gh-catch-unknown-type
Browse files Browse the repository at this point in the history
Catch unknown data type and default to unspecified.
  • Loading branch information
gabrielhaim committed Jan 9, 2015
2 parents 576884d + fdce0e6 commit 72a6d6b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='vertica-python',
version='0.3.2',
version='0.3.3',
description='A native Python client for the Vertica database.',
author='Justin Berka, Alex Kim',
author_email='[email protected], [email protected]',
Expand Down
2 changes: 1 addition & 1 deletion vertica_python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Main module for this library.

# The version number of this library.
version_info = (0, 3, 2)
version_info = (0, 3, 3)
__version__ = '.'.join(map(str, version_info))

__author__ = 'Uber Technologies, Inc'
Expand Down
5 changes: 4 additions & 1 deletion vertica_python/vertica/column.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def __init__(self, col):
self.props = ColumnTuple(col['name'], col['data_type_oid'], None,
col['data_type_size'], None, None, None)

self.converter = self.DATA_TYPE_CONVERSIONS[col['data_type_oid']][1]
try:
self.converter = self.DATA_TYPE_CONVERSIONS[col['data_type_oid']][1]
except IndexError:
self.converter = self.DATA_TYPE_CONVERSIONS[0][1]
# things that are actually sent
# self.name = col['name']
# self.data_type = self.DATA_TYPE_CONVERSIONS[col['data_type_oid']][0]
Expand Down

0 comments on commit 72a6d6b

Please sign in to comment.