changeset 15:cab94a90f9dc traipse_dev

Added 1.8.0 fix to log. Fixed problem with images that do not load the first time. Problem was in the fetching dict. del path instead.
author sirebral
date Tue, 21 Jul 2009 02:34:21 -0500
parents 0b8b7e3ed78d
children 4a73543b8b01
files orpg/mapper/images.py orpg/tools/orpg_log.py
diffstat 2 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/mapper/images.py	Mon Jul 20 21:25:13 2009 -0500
+++ b/orpg/mapper/images.py	Tue Jul 21 02:34:21 2009 -0500
@@ -118,10 +118,10 @@
                     del self.__fetching[path]
             else:
                 open_rpg.get_component('log').log("Image refused to load or URI did not reference a valid image: " + path, ORPG_GENERAL, True)
-                self.__fetching[path] = False
+                del self.__fetching[path]
         except IOError:
-            self.__fetching[path] = False
-            open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT laoded: " + path, ORPG_GENERAL, True)
+            del self.__fetching[path]
+            open_rpg.get_component('log').log("Unable to resolve/open the specified URI; image was NOT laoded: " + path, ORPG_GENERAL, False)
         finally:
             self.__lock.release()
 
--- a/orpg/tools/orpg_log.py	Mon Jul 20 21:25:13 2009 -0500
+++ b/orpg/tools/orpg_log.py	Tue Jul 21 02:34:21 2009 -0500
@@ -38,8 +38,7 @@
         if self.logToConsol or to_consol or type == ORPG_CRITICAL:
             print msg
 
-        if type & self.logLevel:
-        #if type & self.logLevel or to_consol: #Arbitrary removal TaS.
+        if type & self.logLevel or to_consol:
             logMsg = time.strftime( '[%x %X] ', time.localtime( time.time() ) ) + msg + "\n"
             logFile = open(self.logName, "a")
             logFile.write(logMsg)