[Thuban-commits] r2679 - in trunk/thuban: . Extensions/svgexport

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Apr 24 20:26:59 CEST 2006


Author: dpinte
Date: 2006-04-24 20:26:58 +0200 (Mon, 24 Apr 2006)
New Revision: 2679

Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/Extensions/svgexport/__init__.py
Log:
2006-04-24 Didrik Pinte <dpinte at itae.be>
  * Extensions/svgexport/__init__.py: The extension now works on win32
       architecture. Bug #87 corrected.



Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2006-04-20 13:20:48 UTC (rev 2678)
+++ trunk/thuban/ChangeLog	2006-04-24 18:26:58 UTC (rev 2679)
@@ -1,3 +1,7 @@
+2006-04-24 Didrik Pinte <dpinte at itae.be>
+  * Extensions/svgexport/__init__.py: The extension now works on win32
+	architecture. Bug #87 corrected.
+
 2006-04-20 Bernhard Reiter <bernhard at intevation.de>
 	* Doc/technotes/coding_guidelines.txt: Changed text from CVS to SVN.
 	Removed emacs specific hint and replaced it with a general hint

Modified: trunk/thuban/Extensions/svgexport/__init__.py
===================================================================
--- trunk/thuban/Extensions/svgexport/__init__.py	2006-04-20 13:20:48 UTC (rev 2678)
+++ trunk/thuban/Extensions/svgexport/__init__.py	2006-04-24 18:26:58 UTC (rev 2679)
@@ -8,13 +8,16 @@
 
 # import the actual modules
 from os import environ
+from sys import platform
 try:
-    dummy = environ["DISPLAY"]
+    if platform != 'win32':
+      dummy = environ["DISPLAY"]
     import svgsaver
     import maplegend
-except:
-    pass # we don't have a DISPLAY, so don't import the modules
-         # (we probably are in test-mode)
+except:    
+    pass # For non-win32 platform, we don't have a DISPLAY, so don't import 
+         # the modules (for test mode)
+         # For win32 platform, there is  always have a graphical mode
          # Not sure whether this is the best method to avoid problems
          # in the global test routine.
 



More information about the Thuban-commits mailing list