1
0
Fork 0

Merging upstream version 1.10.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 17:52:51 +01:00
parent 126166318f
commit d6fa1559b4
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
4 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,10 @@
## 1.10.1 - 2024-3-23
### Bug Fixes
* Do not crash at start up if ~/.config/litecli is not writeable. [#172](https://github.com/dbcli/litecli/issues/172)
## 1.10.0 - 2022-11-19
### Features

View file

@ -1 +1 @@
__version__ = "1.10.0"
__version__ = "1.10.1"

View file

@ -57,6 +57,10 @@ def get_config(liteclirc_file=None):
liteclirc_file = liteclirc_file or "%sconfig" % config_location()
default_config = os.path.join(package_root, "liteclirc")
write_default_config(default_config, liteclirc_file)
try:
write_default_config(default_config, liteclirc_file)
except OSError:
# If we can't write to the config file, just use the default config
return load_config(default_config)
return load_config(liteclirc_file, default_config)

View file

@ -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"]