Skip to content

Commit

Permalink
Rename initialized variable to not collide with superclass'es interna…
Browse files Browse the repository at this point in the history
…l one
  • Loading branch information
Philipp Adelt committed Jan 24, 2021
1 parent d5db9e6 commit 90c16ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sqlitedict.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def __init__(self, filename, autocommit, journal_mode, timeout):
self.reqs = Queue()
self.setDaemon(True) # python2.5-compatible
self.exception = None
self._initialized = None
self._sqlitedict_thread_initialized = None
self.timeout = timeout
self.log = logging.getLogger('sqlitedict.SqliteMultithread')
self.start()
Expand All @@ -425,7 +425,7 @@ def run(self):
self.exception = sys.exc_info()
raise

self._initialized = True
self._sqlitedict_thread_initialized = True

res = None
while True:
Expand Down Expand Up @@ -591,7 +591,7 @@ def _wait_for_initialization(self):

start_time = time.time()
while time.time() - start_time < self.timeout:
if self._initialized or self.exception:
if self._sqlitedict_thread_initialized or self.exception:
return
time.sleep(0.1)
raise TimeoutError("SqliteMultithread failed to flag initialization withing %0.0f seconds." % self.timeout)
Expand Down

0 comments on commit 90c16ae

Please sign in to comment.