From 01984888e95871b7c0d01ec8cb36e0ef94df2f97 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 22 Jul 2011 21:15:52 +0530 Subject: [PATCH] fix to session cache --- cgi-bin/webnotes/session_cache.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/cgi-bin/webnotes/session_cache.py b/cgi-bin/webnotes/session_cache.py index 8ea8ce18a2..fd9c481104 100644 --- a/cgi-bin/webnotes/session_cache.py +++ b/cgi-bin/webnotes/session_cache.py @@ -118,21 +118,15 @@ def get_letter_heads(): # load startup.js and startup.css from the modules/startup folder def load_startup(cp): - from webnotes.modules import compress + from webnotes.modules import ModuleFile try: from webnotes.defs import modules_path except ImportError: return import os - try: - cp.startup_code = compress.get_js_code(os.path.join(modules_path, 'startup', 'startup')) - startup_css = open(os.path.join(modules_path, 'startup', 'startup.css'), 'r') - cp.startup_css = startup_css.read() - startup_css.close() - except IOError, e: - if e.args[0]!=2: # no startup module! - raise e + cp.startup_code = ModuleFile(os.path.join(modules_path, 'startup', 'startup.js')).get_content() + cp.startup_css = ModuleFile(os.path.join(modules_path, 'startup', 'startup.css')).get_content() # build it # ==================================================