CC-4910: Need to properly handle non-200 http status codes in api client

-fixed
This commit is contained in:
Martin Konecny 2013-02-04 16:05:58 -05:00
parent 20a3f674b4
commit 331386f74f
12 changed files with 156 additions and 156 deletions

View file

@ -85,7 +85,15 @@ class MM2(InstanceThread, Loggable):
ToucherThread(path=user().touch_file_path(),
interval=int(config['touch_interval']))
apiclient.register_component('media-monitor')
success = False
while not success:
try:
apiclient.register_component('media-monitor')
success = True
except Exception, e:
self.logger.error(str(e))
import time
time.sleep(10)
manager.loop()