Skip to content

Commit

Permalink
Merge branch 'master' of github.com:proycon/clam
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Aug 21, 2019
2 parents 47549a5 + df9c6f0 commit a6c4031
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clam/clamdispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import signal
import shutil

VERSION = '2.4.5'
VERSION = '2.4.7'

sys.path.append(sys.path[0] + '/..')

Expand Down
4 changes: 4 additions & 0 deletions clam/clamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2321,6 +2321,8 @@ def DELETE(actionid, credentials=None):


def sufficientresources():
if not settings.ENABLED:
return False, "Service is disabled for maintenance"
if settings.REQUIREMEMORY > 0:
if not os.path.exists('/proc/meminfo'):
printlog("WARNING: No /proc/meminfo available on your system! Not Linux? Skipping memory requirement check!")
Expand Down Expand Up @@ -2655,6 +2657,8 @@ def set_defaults():
settings.OAUTH_ENCRYPTIONSECRET = "%032x" % random.getrandbits(32)
if 'ENABLEWEBAPP' not in settingkeys:
settings.ENABLEWEBAPP = True
if 'ENABLED' not in settingkeys:
settings.ENABLED = True
if 'REMOTEHOST' not in settingkeys:
settings.REMOTEHOST = None
elif 'REMOTEUSER' not in settingkeys:
Expand Down
2 changes: 1 addition & 1 deletion clam/common/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import clam.common.util
import clam.common.viewers

VERSION = '2.4.5'
VERSION = '2.4.7'

#dirs for services shipped with CLAM itself
CONFIGDIR = os.path.abspath(os.path.dirname(__file__) + '/../config/')
Expand Down
2 changes: 1 addition & 1 deletion clam/common/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, id, name, forwarder, **kwargs):
super(ForwardViewer,self).__init__(**kwargs)

def view(self, file, **kwargs):
self.forwarder(None, file)
self.forwarder(None, None, outputfile=file) #this sets the forwardlink on the instance
r = requests.get(self.forwarder.forwardlink, allow_redirects=True)
if r.status_code == 302 and 'Location' in r.headers:
url = r.headers['Location']
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@type": "SoftwareSourceCode",
"identifier": "clam",
"name": "CLAM",
"version": "2.4.5",
"version": "2.4.7",
"description": "Quickly turn command-line applications into RESTful webservices with a web-application front-end. You provide a specification of your command line application, its input, output and parameters, and CLAM wraps around your application to form a fully fledged RESTful webservice. ",
"license": "https://spdx.org/licenses/GPL-3.0",
"url": "https://proycon.github.io/clam",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def read(fname):

setup(
name = "CLAM",
version = "2.4.5", #also change in clam.common.data.VERSION and dispatcher.py and codemeta.json
version = "2.4.7", #also change in clam.common.data.VERSION and dispatcher.py and codemeta.json
author = "Maarten van Gompel",
author_email = "proycon@anaproy.nl",
description = ("Turns command-line NLP tools into fully-fledged RESTful webservices with an auto-generated web-interface for human end-users."),
Expand Down

0 comments on commit a6c4031

Please sign in to comment.