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