Permalink
Browse files

port can be none

  • Loading branch information...
wil committed Feb 11, 2012
1 parent e277d86 commit fe9ca0dba6a2285b0430e197a8b4a11dcc92db88
Showing with 2 additions and 2 deletions.
  1. +2 −2 shorty/config.py
View
@@ -29,12 +29,12 @@
else:
assert False, "Unknown scheme %s" % url.scheme
- SQLALCHEMY_DATABASE_URI = '%s:///%s:%s@%s:%s/%s' % (
+ SQLALCHEMY_DATABASE_URI = '%s:///%s:%s@%s%s/%s' % (
scheme,
url.username,
url.password,
url.hostname,
- url.port,
+ ':%s' % url.port if url.port else '',
url.path[1:],
)
else:

0 comments on commit fe9ca0d

Please sign in to comment.