diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2015-07-01 12:08:11 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2015-07-01 12:08:11 -0400 |
commit | b07cf871939ce5dfea8e8a145ebca39c95e07439 (patch) | |
tree | 997077ac10e5bf5168634de2c5668660e88125f1 /grs/Log.py | |
parent | grs/Kernel.py: don't fail if kernel image dir exists. (diff) | |
download | grss-b07cf871939ce5dfea8e8a145ebca39c95e07439.tar.gz grss-b07cf871939ce5dfea8e8a145ebca39c95e07439.tar.bz2 grss-b07cf871939ce5dfea8e8a145ebca39c95e07439.zip |
Clean up makedirs().
makedirs() exist_ok=True. Use it to avoid FileExistsError. We
are now logging exceptions vi stderr in Daemon.py, so let exceptions
propagate up for debugging.
Diffstat (limited to 'grs/Log.py')
-rw-r--r-- | grs/Log.py | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -11,10 +11,7 @@ class Log(): def __init__(self, logfile = CONST.LOGFILE): self.logfile = logfile - try: - os.makedirs(os.path.dirname(self.logfile)) - except FileExistsError: - pass + os.makedirs(os.path.dirname(self.logfile), exist_ok=True) open(self.logfile, 'a').close() |