Skip to content

Commit

Permalink
Allow STYLE to refer to an absolute path of a CSS file, rather than j…
Browse files Browse the repository at this point in the history
…ust a shortcut style name. #20
  • Loading branch information
proycon committed Mar 10, 2017
1 parent 351a7d6 commit bb38e7e
Show file tree
Hide file tree
Showing 5 changed files with 155 additions and 151 deletions.
7 changes: 5 additions & 2 deletions clam/clamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -1953,7 +1953,7 @@ def errorresponse(msg, code=403):
printdebug('(Invoking converter)')
try:
success = converter.convertforinput(Project.path(project, user) + 'input/' + filename, metadata)
except: #pylint: disable=bare-except
except: #pylint: disable=bare-except
success = False
if not success:
conversionerror = True
Expand Down Expand Up @@ -2044,7 +2044,10 @@ def foliaxsl():


def styledata():
return withheaders(flask.make_response(io.open(settings.CLAMDIR + '/style/' + settings.STYLE + '.css','r',encoding='utf-8').read()),'text/css')
if settings.STYLE[0] == '/':
return withheaders(flask.make_response(io.open(settings.STYLE,'r',encoding='utf-8').read()),'text/css')
else:
return withheaders(flask.make_response(io.open(settings.CLAMDIR + '/style/' + settings.STYLE + '.css','r',encoding='utf-8').read()),'text/css')


def uploader(project, credentials=None):
Expand Down
2 changes: 1 addition & 1 deletion clam/common/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import clam.common.util
import clam.common.viewers

VERSION = '2.1.8'
VERSION = '2.1.9'

#dirs for services shipped with CLAM itself
CONFIGDIR = os.path.abspath(os.path.dirname(__file__) + '/../config/')
Expand Down
Binary file modified docs/clam_manual.pdf
Binary file not shown.

0 comments on commit bb38e7e

Please sign in to comment.