# HG changeset patch # User Tero Marttila # Date 1244989181 -10800 # Node ID e990b7a54d40960d745dffcae8d184b26f3353da # Parent ecceaf23c9697b0df00ecfa66d038ba2740852fd only load the resources/pkg_resources stuff if needed - slight optimization for importing without referencing the stylesheet diff -r ecceaf23c969 -r e990b7a54d40 degal/gallery.py --- a/degal/gallery.py Sun Jun 14 16:34:40 2009 +0300 +++ b/degal/gallery.py Sun Jun 14 17:19:41 2009 +0300 @@ -2,7 +2,7 @@ Top-level gallery state """ -import filesystem, folder, resources +import filesystem, folder from utils import lazy_load @@ -41,8 +41,11 @@ stylesheet = self.degal_dir.subfile('style.css') if not stylesheet.exists() : - # copy it from resources - stylesheet.copy_from(resources.STATIC_DIR.subfile('style.css')) + # load the resources dir + from resource import STATIC_DIR + + # copy it from the static resource file + stylesheet.copy_from(STATIC_DIR.subfile('style.css')) return stylesheet