Allow missing CODES_EXPL and ABSOLUTE_URL in custom config
This commit is contained in:
parent
ba7ae269a7
commit
b4e1b0a955
@ -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)
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user