Permalink
Browse files

Import the psycopg2.extras module fully.

The psycopg2 package import alone won't load the extras module,
resulting in an AttributeError here, when running test cases or other
code that did not previously have the side effect of importing the
extras module.
  • Loading branch information...
1 parent 55ce2ba commit 16a358bf16eea4d3d7c0da8613d51bde348f942b @pjdelport pjdelport committed Aug 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 uuidfield/fields.py
View
@@ -6,7 +6,7 @@
try:
# psycopg2 needs us to register the uuid type
- import psycopg2
+ import psycopg2.extras
psycopg2.extras.register_uuid()
except (ImportError, AttributeError):
pass

0 comments on commit 16a358b

Please sign in to comment.