From 93682af4eb2fe1fc57581404e34eedc76280e69b Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Mon, 6 Jan 2014 10:24:00 -0500 Subject: [PATCH] Don't catch all exceptions. --- common/lib/xmodule/xmodule/contentstore/mongo.py | 2 +- common/lib/xmodule/xmodule/contentstore/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/contentstore/mongo.py b/common/lib/xmodule/xmodule/contentstore/mongo.py index b83a020b9f..0d42ec8a73 100644 --- a/common/lib/xmodule/xmodule/contentstore/mongo.py +++ b/common/lib/xmodule/xmodule/contentstore/mongo.py @@ -100,7 +100,7 @@ class MongoContentStore(ContentStore): 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 7c61c979f2..dca7194c4f 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