Fallback to non-minified scripts
This commit is contained in:
@@ -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__)
|
||||||
|
|
||||||
@@ -138,12 +139,15 @@ class ClientScript(Plugin):
|
|||||||
data = '' if as_html else []
|
data = '' if as_html else []
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if not Env.get('dev'):
|
try:
|
||||||
return self.minified[type][location]
|
if not Env.get('dev'):
|
||||||
|
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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user