cc-4105: fixed bug where key was int instead of string. added more reliable error handling
This commit is contained in:
parent
6e2e7d83ad
commit
b604dd0795
|
@ -143,13 +143,16 @@ class AirtimeMessageReceiver(Loggable):
|
||||||
def rescan_watch(self, msg):
|
def rescan_watch(self, msg):
|
||||||
self.logger.info("Trying to rescan watched directory: '%s'" % msg['directory'])
|
self.logger.info("Trying to rescan watched directory: '%s'" % msg['directory'])
|
||||||
try:
|
try:
|
||||||
self.__request_now_bootstrap(msg['id'])
|
# id is always an integer but in the dictionary the key is always a
|
||||||
|
# string
|
||||||
|
self.__request_now_bootstrap( unicode(msg['id']) )
|
||||||
except DirectoryIsNotListed as e:
|
except DirectoryIsNotListed as e:
|
||||||
self.logger.info("Bad rescan request")
|
self.logger.info("Bad rescan request")
|
||||||
self.logger.info( str(e) )
|
self.logger.info( str(e) )
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.logger.info("Bad rescan request. Unknown error.")
|
self.logger.info("Bad rescan request. Unknown error.")
|
||||||
self.logger.info( str(e) )
|
self.logger.info( str(e) )
|
||||||
|
self.logger.info( traceback.format_exc() )
|
||||||
else:
|
else:
|
||||||
self.logger.info("Successfully re-scanned: '%s'" % msg['directory'])
|
self.logger.info("Successfully re-scanned: '%s'" % msg['directory'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue