diff --git a/ZScolar.py b/ZScolar.py index 209a60940..4a536358d 100644 --- a/ZScolar.py +++ b/ZScolar.py @@ -108,7 +108,7 @@ import sco_dump_db from VERSION import SCOVERSION, SCONEWS -if CONFIG.ABSOLUTE_URL: +if hasattr(CONFIG, "ABSOLUTE_URL") and CONFIG.ABSOLUTE_URL: log("ScoDoc: ABSOLUTE_URL='%s'" % CONFIG.ABSOLUTE_URL) log("ScoDoc: using encoding %s" % SCO_ENCODING) diff --git a/sco_utils.py b/sco_utils.py index 732ed896f..9e9da47d7 100644 --- a/sco_utils.py +++ b/sco_utils.py @@ -230,7 +230,8 @@ except: sys.stderr.write("sco_utils: error in configuration file %s" % _config_filename) raise -CODES_EXPL.update(CONFIG.CODES_EXPL) # peremt de customiser les explications de codes +if hasattr(CONFIG, "CODES_EXPL"): + CODES_EXPL.update(CONFIG.CODES_EXPL) # permet de customiser les explications de codes if CONFIG.CUSTOM_HTML_HEADER: