Skip to content

Commit

Permalink
fix python3 allowed empty urlparse
Browse files Browse the repository at this point in the history
  • Loading branch information
crccheck committed Feb 1, 2014
1 parent 808fbc4 commit 823b9ca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion postdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@

def get_uri(env='DATABASE_URL'):
"""Grab and parse the url from the environment."""
return urlparse(os.environ.get(env))
# trick python3's urlparse into raising an exception
return urlparse(os.environ.get(env, 1337))


def connect_bits(meta):
Expand Down

0 comments on commit 823b9ca

Please sign in to comment.