Log if the file used for rights management is not found

This commit is contained in:
Guillaume Ayoub 2013-05-15 22:49:02 +02:00
parent fce91e7060
commit ca0a1ecfde

View File

@ -64,7 +64,9 @@ FILENAME = os.path.expanduser(config.get("rights", "file"))
if FILENAME: if FILENAME:
log.LOGGER.debug("Reading rights from file %s" % FILENAME) log.LOGGER.debug("Reading rights from file %s" % FILENAME)
RIGHTS = ConfigParser() RIGHTS = ConfigParser()
RIGHTS.read(FILENAME) if not RIGHTS.read(FILENAME):
log.LOGGER.error(
"File '%s' not found for rights management" % FILENAME)
else: else:
log.LOGGER.error("No file name configured for rights type 'from_file'") log.LOGGER.error("No file name configured for rights type 'from_file'")
RIGHTS = None RIGHTS = None