log out subsession if thread dies

This commit is contained in:
Mike McLean 2014-10-16 11:12:56 -04:00
parent b86e4fec54
commit 8e4deac955

View file

@ -311,12 +311,15 @@ class RepoManager(object):
"""Continually checks repos for currency. Runs as a separate thread"""
self.logger.info('currencyChecker starting')
try:
while True:
self.checkCurrentRepos(session)
time.sleep(self.options.sleeptime)
except:
logger.exception('Error in currency checker thread')
raise
try:
while True:
self.checkCurrentRepos(session)
time.sleep(self.options.sleeptime)
except:
logger.exception('Error in currency checker thread')
raise
finally:
session.logout()
def pruneLocalRepos(self):
"""Scan filesystem for repos and remove any deleted ones