Exception when log output set to system reserved area

Issue #9 resolved
blakeca00 repo owner created an issue

Must Trap permissions error if config file logging location set to: * log_mode = FILE * log_path = /var/log/filename

  File "/usr/local/lib/python3.6/site-packages/keyup/logd.py", line 55, in getLogger
    f_handler = logging.FileHandler(local_config['LOGGING']['LOG_PATH'])
  File "/usr/local/lib/python3.6/logging/__init__.py", line 1030, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/local/lib/python3.6/logging/__init__.py", line 1059, in _open
    return open(self.baseFilename, self.mode, encoding=self.encoding)
**PermissionError:** [Errno 13] Permission denied: '/var/log/keyup.log'

Comments (2)

  1. blakeca00 reporter

    keyup now tests ability to write to given path, traps exception if write refused during configuration menu walk-thru.

    prompts user for an alternate path

  2. Log in to comment