changeset 99:a647e0e8f520 alpha

Traipse Alpha 'OpenRPG' {090925-00} Traipse is a distribution of OpenRPG that is designed to be easy to setup and go. Traipse also makes it easy for developers to work on code without fear of sacrifice. 'Ornery-Orc' continues the trend of 'Grumpy' and adds fixes to the code. 'Ornery-Orc's main goal is to offer more advanced features and enhance the productivity of the user. Update Summary: 00: Update forwards to the 090909-02 Server code that now works. New default Lobby Map, designed for Traipse. Feel free to change it. Updates to Server GUI: * Admin can Ban from Backend. * Prework to modify Ban List in back end. * Server GUI finds your Lobby Name * New users default as Lurker unless a Role is set New Addition to Chat Die Roll commands. Math Ordering. Ex. [(X+Y)dZ]. Currently does pairs only, no nesting either. Cleaner TraipseSuiteAttention portability and clean up in Main (Beta!) 01: Die Roll Commands addition removed in favor of Core code {090925-00}: Updates to Server GUI: *Admin can Modify Ban List and Un Ban users. New About Dialog. A more uniform About Dialog. 01: Corrects image loading of duplicate images.
author sirebral
date Fri, 25 Sep 2009 20:37:54 -0500
parents 95b5281e8d34
children 905fa5b06d53
files orpg/mapper/images.py orpg/orpg_version.py
diffstat 2 files changed, 22 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/orpg/mapper/images.py	Fri Sep 25 06:16:37 2009 -0500
+++ b/orpg/mapper/images.py	Fri Sep 25 20:37:54 2009 -0500
@@ -78,12 +78,10 @@
                 self.__cache[path] = (path, d[0], d[1].gettype(), None)
                 return wx.ImageFromMime(self.__cache[path][1], self.__cache[path][2]).ConvertToBitmap()
             else:
-                logger.general("Image refused to load or URI did not reference a valid image: " + path)
-                component.get('chat').InfoPost("<font color='#FF0000'>Image refused to load or URI did not reference a valid image: " + path + "</font>")
+                logger.exception(str("Image refused to load or URI did not reference a valid image: " + path), True)
                 return None
         except IOError:
-            logger.general("Unable to resolve/open the specified URI; image was NOT loaded: " + path)
-            component.get('chat').InfoPost("<font color='#FF0000'>Unable to resolve/open the specified URI; image was NOT loaded: " + path + "</font>")
+            logger.exception(str("Unable to resolve/open the specified URI; image was NOT loaded: " + path), True)
             return None
 
     def cleanCache(self):
@@ -115,37 +113,32 @@
             if d[0] and d[1].getmaintype() == "image":
                 self.__cache[path] = (path, d[0], d[1].gettype(), imageId)
                 self.__queue.put((self.__cache[path], image_type, imageId))
-                if self.__fetching.has_key(path): self.__fetching[path] = False #Fix for failed multi-load?
+                if self.__fetching.has_key(path): del self.__fetching[path]
             else:
-                logger.general("Image refused to load or URI did not reference a valid image: " + path)
-                component.get('chat').InfoPost("<font color='#FF0000'>Image refused to load or URI did not reference a valid image: " + path +"</font>")
+                logger.exception(str("Image refused to load or URI did not reference a valid image: " + path), True)
                 del self.__fetching[path]
         except IOError:
             del self.__fetching[path]
-            logger.general("Unable to resolve/open the specified URI; image was NOT loaded: " + path)
-            component.get('chat').InfoPost("<font color='#FF0000'> Unable to resolve/open the specified URI; image was NOT loaded: " + path + "</font>")
+            logger.exception(str("Unable to resolve/open the specified URI; image was NOT loaded: " + path), True)
         finally: self.__lock.release()
 
     def __loadCacheThread(self, path, image_type, imageId):
-        if self.__cache.has_key(path):
-            try:
-                st = time.time()
-                while self.__fetching.has_key(path) and self.__fetching[path] is not False:
-                    time.sleep(0.025)
-                    if (time.time()-st) > 120:
-                        logger.general("Timeout: " + path)
-                        break
-            except:
-                del self.__fetching[path]
-                logger.general("Unable to resolve/open the specified URI; image was NOT loaded: " + path)
-                component.get('chat').InfoPost("<font color='#FF0000'>Unable to resolve/open the specified URI; image was NOT loaded: " + path + "</font>")
-                return 
-            self.__lock.acquire()
-            try:
-                logger.debug("Adding Image to Queue from Cache: " + str(self.__cache[path]))
-                component.debug('chat').InfoPost("<font color='#FF0000'>Adding Image to Queue from Cache: " + str(self.__cache[path]) + "</font>")
-                self.__queue.put((self.__cache[path], image_type, imageId))
-            finally: self.__lock.release()
+        try:
+            st = time.time()
+            while self.__fetching.has_key(path) and self.__fetching[path] is not False:
+                time.sleep(0.025)
+                if (time.time()-st) > 120:
+                    logger.general("Timeout: " + path)
+                    break
+        except:
+            del self.__fetching[path]
+            logger.exception(str("Unable to resolve/open the specified URI; image was NOT loaded: " + path), True)
+            return 
+        self.__lock.acquire()
+        try:
+            logger.info("Adding Image to Queue from Cache: " + str(self.__cache[path]), True)
+            self.__queue.put((self.__cache[path], image_type, imageId))
+        finally: self.__lock.release()
 
     """Property Methods"""
     def _getCache(self):
--- a/orpg/orpg_version.py	Fri Sep 25 06:16:37 2009 -0500
+++ b/orpg/orpg_version.py	Fri Sep 25 20:37:54 2009 -0500
@@ -4,7 +4,7 @@
 #BUILD NUMBER FORMAT: "YYMMDD-##" where ## is the incremental daily build index (if needed)
 DISTRO = "Traipse Alpha"
 DIS_VER = "Ornery Orc"
-BUILD = "090925-00"
+BUILD = "090925-01"
 
 # This version is for network capability.
 PROTOCOL_VERSION = "1.2"