From 8fd7a27d5f59e1d11a9bea335839a66df02fd43e Mon Sep 17 00:00:00 2001 From: mdipierro Date: Sun, 9 Aug 2015 09:26:57 -0500 Subject: [PATCH] fixed problem with pack all and missing cache folder --- gluon/admin.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gluon/admin.py b/gluon/admin.py index 602786dd..77ce646d 100644 --- a/gluon/admin.py +++ b/gluon/admin.py @@ -59,6 +59,8 @@ def app_pack(app, request, raise_ex=False, filenames=None): w2p_pack(filename, apath(app, request), filenames=filenames) return filename except Exception, e: + import traceback + print traceback.format_exc() if raise_ex: raise return False @@ -118,10 +120,9 @@ def app_cleanup(app, request): r = False # Remove cache files - path = apath('%s/cache/' % app, request) - CacheOnDisk(folder=path).clear() - + path = apath('%s/cache/' % app, request) if os.path.exists(path): + CacheOnDisk(folder=path).clear() for f in os.listdir(path): try: if f[:1] != '.': recursive_unlink(os.path.join(path, f))