Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed invalid URL parsing

  • Loading branch information...
commit 8d73c4c0919d7be09880d155bca912aa3b39cda7 1 parent bc5f31d
@pcdinh pcdinh authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 nomad/engine/dbapi.py
View
6 nomad/engine/dbapi.py
@@ -7,7 +7,7 @@ def path2dict(p, **renames):
'''Convert urlparse result to dict
'''
result = {}
- for k in 'hostname port path user password'.split():
+ for k in 'hostname port path username password'.split():
value = getattr(p, k, None)
if not value:
continue
@@ -73,7 +73,7 @@ class Mysql(Connection):
_conn = None
def __init__(self, path):
self.parameters = path2dict(path, hostname='host',
- password='passwd', path='db')
+ password='passwd', path='db', username='user')
import MySQLdb
self.module = MySQLdb
self.exc = MySQLdb.MySQLError
@@ -100,7 +100,7 @@ def rollback(self):
class Pgsql(Connection):
_conn = None
def __init__(self, path):
- self.parameters = path2dict(path, hostname='host', path='database')
+ self.parameters = path2dict(path, hostname='host', path='database', username='user')
import psycopg2
self.module = psycopg2
self.exc = psycopg2.Error
Please sign in to comment.
Something went wrong with that request. Please try again.