Skip to content

Commit

Permalink
Import the psycopg2.extras module fully.
Browse files Browse the repository at this point in the history
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
PiDelport committed Aug 16, 2012
1 parent 55ce2ba commit 16a358b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uuidfield/fields.py
Expand Up @@ -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
Expand Down

0 comments on commit 16a358b

Please sign in to comment.