From 009c6e067aa7e7de90e6d83ea827be67663fffd9 Mon Sep 17 00:00:00 2001 From: "Zhidong.Hao" Date: Fri, 11 Apr 2014 15:28:40 -0400 Subject: [PATCH 1/2] ASM #473 - GFE ISC: Log directory creation problem results in missing ISC grids Change-Id: Ib6114ba3cf11095fcfc2d89e356db53ca935244c Former-commit-id: 30eba1a2397c41fed1b564af4c31791040b14eac --- .../utility/edex_static/base/gfe/isc/iscUtil.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscUtil.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscUtil.py index 4a72410c98..2a22629c5a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscUtil.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscUtil.py @@ -51,6 +51,7 @@ from com.raytheon.uf.common.localization import LocalizationContext_Localization # methods where it's needed. # 11/07/13 2517 randerso Allow getLogger to override logLevel # 01/22/14/ 2504 randerso Added hostname to log path +# 04/10/2014 17241 David Gillingham (code checked in by zhao) # # @@ -297,8 +298,12 @@ def getLogger(scriptName, logName=None, logLevel=logging.INFO): logFile = os.path.join(logPath, logName) - if not os.path.exists(logPath): + try: os.makedirs(logPath) + except OSError as e: + import errno + if e.errno != errno.EEXIST: + raise e theLog = logging.getLogger(scriptName) theLog.setLevel(logLevel) From 0b499061da502a05cb547d97767fbc306eea759a Mon Sep 17 00:00:00 2001 From: "Zhidong.Hao" Date: Fri, 11 Apr 2014 15:50:38 -0400 Subject: [PATCH 2/2] ASM #474 - GFE ISC: AttributeError results in failure to process ISC grid Change-Id: I5e5681f2647abfcd9cd8d97e6189c484b60e8fe1 Former-commit-id: 015d4307168ca7fbc70bf0ae0e2e9abd24463d90 --- .../utility/edex_static/base/gfe/isc/iscMosaic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py index 0a647dd556..402fdd7032 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py @@ -86,6 +86,7 @@ from com.raytheon.uf.edex.database.cluster import ClusterTask # Changed WECache to limit the number of cached grids kept in memory # 01/09/14 16952 randerso Fix regression made in #2517 which caused errors with overlapping grids # 02/04/14 17042 ryu Check in changes for randerso. +# 04/11/2014 17242 David Gillingham (code checked in by zhao) # BATCH_DELAY = 0.0 @@ -908,8 +909,7 @@ class IscMosaic: destGrid, history = grid self.__dbGrid = (destGrid, history, tr) else: - self.logProblem("Unable to access grid for ", - self.__printTR(tr), "for ", self.__parmName) + logger.error("Unable to access grid for "+self.__printTR(tr) +" for " + self.__parmName) return None return (self.__dbGrid[0], self.__dbGrid[1])