Skip to content

Commit

Permalink
don't fail if we are missing readline, don't fail if app is not confi…
Browse files Browse the repository at this point in the history
…gured
  • Loading branch information
domenkozar committed Mar 27, 2013
1 parent 67413b0 commit f0980ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion almir/meta.py
Expand Up @@ -31,7 +31,7 @@ class ModelMixin(object):

@declared_attr
def __tablename__(cls):
if cls.metadata.bind.dialect.name == 'postgresql': # PRAGMA: no cover
if cls.metadata.bind and cls.metadata.bind.dialect.name == 'postgresql': # PRAGMA: no cover
return cls.__name__.lower()
else:
return cls.__name__
Expand Down
8 changes: 6 additions & 2 deletions almir/scripts/configure_deploy.py
Expand Up @@ -4,9 +4,13 @@
import getpass
import socket
import subprocess
import readline
import time
readline # pyflakes: we import readline and raw_input has history!
try:
import readline
except ImportError:
pass
else:
readline # pyflakes: we import readline and raw_input has history!

import pytz
import sqlalchemy
Expand Down

0 comments on commit f0980ca

Please sign in to comment.