Explorar el Código

change log function to log_and_raise_error

tsteuer hace 5 años
padre
commit
dfc555dc1c
Se han modificado 1 ficheros con 4 adiciones y 4 borrados
  1. 4 4
      cdplib/db_migration/MigrationCleaning.py

+ 4 - 4
cdplib/db_migration/MigrationCleaning.py

@@ -141,7 +141,7 @@ class MigrationCleaning:
                     (target_field in target_types) and\
                     (target_types[target_field] != source_types[source_field]):
 
-                self.log_and_raise(("Type {0} of field {1} "
+                self.log_and_raise_error(("Type {0} of field {1} "
                                     "in schema does not match "
                                     "type {2} of field {3} in "
                                     "migration mapping")
@@ -315,7 +315,7 @@ class MigrationCleaning:
 
             except Exception as e:
 
-                self._exception_handler.log_and_raise(("Failed to replace {0} values "
+                self._exception_handler.log_and_raise_error(("Failed to replace {0} values "
                                     "in {1}. Exit with error {2}"
                                     .format(default_str, column, e)))
 
@@ -352,7 +352,7 @@ class MigrationCleaning:
 
                 elif (python_type == int) and data[column].isnull().any():
 
-                    self.log_and_raise(("Column {} contains missing values "
+                    self.log_and_raise_error(("Column {} contains missing values "
                                         "and cannot be of integer type"
                                         .format(column)))
 
@@ -376,7 +376,7 @@ class MigrationCleaning:
 
             except Exception as e:
 
-                self._exception_handler.log_and_raise(("Failed to convert types in {0}. "
+                self._exception_handler.log_and_raise_error(("Failed to convert types in {0}. "
                                     "Exit with error {1}"
                                     .format(column, e)))