Merging upstream version 1.10.1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
126166318f
commit
d6fa1559b4
4 changed files with 18 additions and 3 deletions
|
@ -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
|
## 1.10.0 - 2022-11-19
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = "1.10.0"
|
__version__ = "1.10.1"
|
||||||
|
|
|
@ -57,6 +57,10 @@ def get_config(liteclirc_file=None):
|
||||||
liteclirc_file = liteclirc_file or "%sconfig" % config_location()
|
liteclirc_file = liteclirc_file or "%sconfig" % config_location()
|
||||||
|
|
||||||
default_config = os.path.join(package_root, "liteclirc")
|
default_config = os.path.join(package_root, "liteclirc")
|
||||||
|
try:
|
||||||
write_default_config(default_config, liteclirc_file)
|
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)
|
return load_config(liteclirc_file, default_config)
|
||||||
|
|
|
@ -239,7 +239,11 @@ class LiteCli(object):
|
||||||
log_file = self.config["main"]["log_file"]
|
log_file = self.config["main"]["log_file"]
|
||||||
if log_file == "default":
|
if log_file == "default":
|
||||||
log_file = config_location() + "log"
|
log_file = config_location() + "log"
|
||||||
|
try:
|
||||||
ensure_dir_exists(log_file)
|
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"]
|
log_level = self.config["main"]["log_level"]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue