Skip to content

Commit

Permalink
Should solve issue #24 on older configuration files (no future import)
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Feb 8, 2016
1 parent b597a8c commit 36f66e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions clam/clamservice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2400,6 +2400,11 @@ def set_defaults():
if not s in settingkeys:
error("ERROR: Service configuration incomplete, missing setting: " + s)

if sys.version < '3':
if isinstance(settingkeys['SYSTEM_DESCRIPTION'],str):
settings.SYSTEM_DESCRIPTION = unicode(settingkeys['SYSTEM_DESCRIPTION'],'utf-8') #pylint: disable=undefined-variable
if isinstance(settingkeys['SYSTEM_NAME'],str):
settings.SYSTEM_NAME = unicode(settingkeys['SYSTEM_NAME'],'utf-8') #pylint: disable=undefined-variable


if 'ROOT' in settingkeys and settings.ROOT and not settings.ROOT[-1] == "/":
Expand Down
2 changes: 1 addition & 1 deletion clam/config/textstats3.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
SYSTEM_NAME = "Text Statistics (CLAM Demo)"

#An informative description for this system:
SYSTEM_DESCRIPTION = "This webservice computes several statistics for plaintext files. It is a demo for CLAM."
SYSTEM_DESCRIPTION = "This webservice computes several statistics for plaintext files. It is a demo for CLAM. Это демо для Клам.."

# ======== LOCATION ===========

Expand Down

0 comments on commit 36f66e0

Please sign in to comment.