CC-4092: Not checking for return type "None" on some function calls in media-monitor

-more fixes
This commit is contained in:
Martin Konecny 2012-07-11 17:09:17 -04:00
parent ba5a749073
commit fc1b69e1d1
2 changed files with 6 additions and 7 deletions

View file

@ -69,12 +69,11 @@ class AirtimeMediaMonitorBootstrap():
json = self.api_client.list_all_watched_dirs()
try:
dirs = getattr(json, "dirs")
except AttributeError:
self.logger.error("Could not find index 'dirs' in dictionary: %s", str(dirs))
return json["dirs"]
except KeyError as e:
self.logger.error("Could not find index 'dirs' in dictionary: %s", str(json))
self.logger.error(e)
return {}
return dirs
"""
This function takes in a path name provided by the database (and its corresponding row id)