From be00b01c230027d380103f76129ff115dcbaa08d Mon Sep 17 00:00:00 2001 From: Bernd Gollesch Date: Sat, 6 Dec 2014 00:27:27 +0100 Subject: [PATCH] only make the deprecation check in debug mode (as per owner request) --- cache.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/cache.py b/cache.py index 8b1a5153..e742b7ec 100644 --- a/cache.py +++ b/cache.py @@ -650,9 +650,12 @@ def processImportFile(tdenv, db, importPath, tableName): tdenv.DEBUG0("SQL-Statement: {}", sql_stmt) # Check if there is a deprecation check for this table. - deprecationFn = getattr(sys.modules[__name__], - "deprecationCheck"+tableName, - None) + if tdenv.debug: + deprecationFn = getattr(sys.modules[__name__], + "deprecationCheck"+tableName, + None) + else: + deprecationFn = None # import the data importCount = 0