jan: thuban/Extensions/svgexport __init__.py,1.2,1.3
Bernhard Herzog
bh at intevation.de
Thu Nov 25 22:13:34 CET 2004
cvs at intevation.de writes:
> +# import the actual modules
> +from os import environ
> +try:
> + 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)
That's not the right solution IMO. No code should check whether it's
running under the test suite or not. I'm not sure yet what the best
solution is, but as a first step, I'd say that the __init__ module in
the extension packages should not import the GUI parts of the extension
automatically.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)