diff --git a/src/Pyro4/__init__.py b/src/Pyro4/__init__.py index 264f68e4..cd37b979 100644 --- a/src/Pyro4/__init__.py +++ b/src/Pyro4/__init__.py @@ -37,10 +37,10 @@ def _configLogging(): logfile_dir = os.path.dirname(os.path.expanduser(logfilename)) tempfile = tempfile.TemporaryFile(dir=logfile_dir) tempfile.close() - except OSError as x: - # cannot write in current directory, use the default console logger + except OSError: + # cannot write in the desired logfile directory, use the default console logger logging.basicConfig(level=levelvalue) - logging.getLogger("Pyro4").warn("unable to write to the given logfile (access rights?), falling back to console logger") + logging.getLogger("Pyro4").warn("unable to write to the desired logfile (access rights?), falling back to console logger") else: # set up a basic logfile in current directory logging.basicConfig(