Fallback to non-minified scripts

This commit is contained in:
Ruud committed 2013-02-22 21:23:38 +01:00
1 parent 46c7e3fbed
commit 9cb3bef156
1 file changed
+6 -2
+6 -2
View File
@@ -6,6 +6,7 @@ from couchpotato.environment import Env
from minify.cssmin import cssmin from minify.cssmin import cssmin
from minify.jsmin import jsmin from minify.jsmin import jsmin
import os import os
import traceback
log = CPLog(__name__) log = CPLog(__name__)
@@ -137,13 +138,16 @@ class ClientScript(Plugin):
data = '' if as_html else [] data = '' if as_html else []
try:
try: try:
if not Env.get('dev'): if not Env.get('dev'):
return self.minified[type][location] return self.minified[type][location]
except:
pass
return self.urls[type][location] return self.urls[type][location]
except Exception, e: except:
log.error(e) log.error('Error getting minified %s, %s: %s', (type, location, traceback.format_exc()))
return data return data