Skip to content

Commit

Permalink
Fixed AttributeError about _sql for --query.
Browse files Browse the repository at this point in the history
  • Loading branch information
jtobey committed Apr 25, 2014
1 parent 14cd464 commit 90092a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Abe/DataStore.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def __init__(store, args):
store.config = CONFIG_DEFAULTS.copy()
store.datadirs = []
store.use_firstbits = CONFIG_DEFAULTS['use_firstbits']
store._sql = None
return
store.dbmodule = __import__(args.dbtype)

Expand Down Expand Up @@ -239,7 +240,8 @@ def commit(store):
store._sql.commit()

def rollback(store):
store._sql.rollback()
if store._sql is not None:
store._sql.rollback()

def sql(store, stmt, params=()):
store._sql.sql(stmt, params)
Expand Down

0 comments on commit 90092a7

Please sign in to comment.