Browse Source

Changed error message for trying to drop a collection which doesnt exist.

ogert 4 years ago
parent
commit
9f5c05c311
2 changed files with 2 additions and 1 deletions
  1. 1 0
      Pipfile
  2. 1 1
      cdplib/db_handlers/MongodbHandler.py

+ 1 - 0
Pipfile

@@ -33,6 +33,7 @@ xeger = "*"
 simplejson = "*"
 mysql = "*"
 sqlalchemy-utils = "*"
+apyori==1.1.1
 
 [requires]
 python_version = "3"

+ 1 - 1
cdplib/db_handlers/MongodbHandler.py

@@ -111,7 +111,7 @@ class MongodbHandler:
         try:
             return_message = self._database.drop_collection(collection_name)
             if 'errmsg' in return_message:
-                raise Exception(return_message['errmsg'])
+                self._log.warning(('Couldnt drop the collection {}. Error: {}').format(collection_name, return_message['errmsg'])
         except Exception as error:
             self._log.log_and_raise_error(('Couldnt drop the collection {}. Error: {}').format(collection_name, error))