diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index b83a020b9fe0..0d42ec8a731b 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -100,7 +100,7 @@ def get_stream(self, location): def close_stream(self, handle): try: handle.close() - except: + except Exception: pass def export(self, location, output_directory): diff --git a/common/lib/xmodule/xmodule/contentstore/utils.py b/common/lib/xmodule/xmodule/contentstore/utils.py index 7c61c979f219..dca7194c4f20 100644 --- a/common/lib/xmodule/xmodule/contentstore/utils.py +++ b/common/lib/xmodule/xmodule/contentstore/utils.py @@ -45,5 +45,5 @@ def restore_asset_from_trashcan(location): try: thumbnail_content = trash.find(content.thumbnail_location) store.save(thumbnail_content) - except: + except Exception: pass # OK if this is left dangling