Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Commit

Permalink
Avoid an exception raised when IPython is unavailable.
Browse files Browse the repository at this point in the history
  • Loading branch information
Keisuke Nishida committed Jul 26, 2015
1 parent bb1ec28 commit a40e8e0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pandas_td/td.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,18 @@ def query_engine(self, database, **kwargs):
return QueryEngine(self, database, kwargs, header=True, show_progress=5)

class QueryEngine(object):
def __init__(self, connection, database, params=None, header=False, show_progress=False, clear_progress=True):
def __init__(self, connection, database, params=None, header=False, show_progress=False, clear_progress=False):
self.connection = connection
self.database = database
self._params = {} if params is None else params
self._header = header
if IPython and not sys.stdout.isatty():
# Enable progress for IPython notebook
self.show_progress = show_progress
self.clear_progress = clear_progress
else:
self.show_progress = False
self.clear_progress = clear_progress
self.clear_progress = False

@property
def type(self):
Expand Down

0 comments on commit a40e8e0

Please sign in to comment.