summaryrefslogtreecommitdiffstats
path: root/litecli/main.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 08:01:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 08:02:05 +0000
commit58eb230a3998a0224ff264095ee157e3e2e2f5ce (patch)
treef454f7ad668faaab4f49679b69e9b5416c18db0d /litecli/main.py
parentReleasing debian version 1.10.0-1. (diff)
downloadlitecli-58eb230a3998a0224ff264095ee157e3e2e2f5ce.tar.xz
litecli-58eb230a3998a0224ff264095ee157e3e2e2f5ce.zip
Merging upstream version 1.10.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--litecli/main.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/litecli/main.py b/litecli/main.py
index e608da7..268ede2 100644
--- a/litecli/main.py
+++ b/litecli/main.py
@@ -239,7 +239,11 @@ class LiteCli(object):
log_file = self.config["main"]["log_file"]
if log_file == "default":
log_file = config_location() + "log"
- ensure_dir_exists(log_file)
+ try:
+ ensure_dir_exists(log_file)
+ except OSError:
+ # Unable to create log file, log to temp directory instead.
+ log_file = "/tmp/litecli.log"
log_level = self.config["main"]["log_level"]