- for ftochk in [self.config['log']['logfile'],
- self.config['daemon']['pidfile'],]:
+ for op, ftochk in [('logfile', self.config.get('log','logfile')),
+ ('pidfile', self.config.get('daemon', 'pidfile')),]:
+ if not ftochk:
+ continue
+ if isdir(ftochk):
+ self.log.critical('Need a file not a directory: "{}"'.format(ftochk))
+ ok = False