Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed error in creating PostgresDB with pgdb driver. Closes #23 (tx c…

…ninucci)
  • Loading branch information...
commit 35674c8cd49e29853e8728fdf5fdb4ab0da5b58a 1 parent ee95ac7
@anandology anandology authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 web/db.py
View
6 web/db.py
@@ -915,7 +915,11 @@ def _get_all_sequences(self):
def _connect(self, keywords):
conn = DB._connect(self, keywords)
- conn.set_client_encoding('UTF8')
+ try:
+ conn.set_client_encoding('UTF8')
+ except AttributeError:
+ # fallback for pgdb driver
+ conn.cursor().execute("set client_encoding to 'UTF-8'")
return conn
def _connect_with_pooling(self, keywords):
Please sign in to comment.
Something went wrong with that request. Please try again.