mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-17 07:48:18 +01:00
BugFixed: KeyError: 'sbo_chglog_txt'
This commit is contained in:
parent
943c8e9696
commit
e9d7190f22
2 changed files with 32 additions and 27 deletions
|
@ -1,6 +1,7 @@
|
|||
4.4.4 - 31/12/2002
|
||||
BugFixed:
|
||||
- AttributeError: 'PosixPath' object has no attribute 'startswith'
|
||||
- KeyError: 'sbo_chglog_txt' #LQ post6401410
|
||||
|
||||
4.4.3 - 30/12/2022
|
||||
Updated:
|
||||
|
|
|
@ -18,8 +18,8 @@ class LoadConfigs:
|
|||
if config_path_file.exists():
|
||||
with open(config_path_file, 'rb') as conf:
|
||||
return tomli.load(conf)
|
||||
except (KeyError, tomli.TOMLDecodeError) as error:
|
||||
raise SystemExit(f"\nError: {error}: in the configuration file "
|
||||
except tomli.TOMLDecodeError as error:
|
||||
raise SystemExit(f"\nValueError: {error}: in the configuration file "
|
||||
"'/etc/slpkg/slpkg.toml'\n")
|
||||
|
||||
|
||||
|
@ -73,38 +73,42 @@ class Configs:
|
|||
config = configs['configs']
|
||||
|
||||
if config:
|
||||
# OS architecture by default
|
||||
os_arch: str = config['os_arch']
|
||||
try:
|
||||
# OS architecture by default
|
||||
os_arch: str = config['os_arch']
|
||||
|
||||
# All necessary paths
|
||||
tmp_slpkg: str = config['tmp_slpkg']
|
||||
build_path: str = config['build_path']
|
||||
download_only: str = config['download_only']
|
||||
sbo_repo_path: str = config['sbo_repo_path']
|
||||
# All necessary paths
|
||||
tmp_slpkg: str = config['tmp_slpkg']
|
||||
build_path: str = config['build_path']
|
||||
download_only: str = config['download_only']
|
||||
sbo_repo_path: str = config['sbo_repo_path']
|
||||
|
||||
# Database name
|
||||
database: str = config['database']
|
||||
# Database name
|
||||
database: str = config['database']
|
||||
|
||||
# SBo repository details
|
||||
sbo_repo_url: str = config['sbo_repo_url']
|
||||
sbo_txt: str = config['sbo_txt']
|
||||
sbo_chglog_txt: str = config['sbo_chglog_txt']
|
||||
sbo_tar_suffix: str = config['sbo_tar_suffix']
|
||||
sbo_repo_tag: str = config['sbo_repo_tag']
|
||||
# SBo repository details
|
||||
sbo_repo_url: str = config['sbo_repo_url']
|
||||
sbo_txt: str = config['sbo_txt']
|
||||
sbo_chglog_txt: str = config['sbo_chglog_txt']
|
||||
sbo_tar_suffix: str = config['sbo_tar_suffix']
|
||||
sbo_repo_tag: str = config['sbo_repo_tag']
|
||||
|
||||
# Slackware commands
|
||||
installpkg: str = config['installpkg']
|
||||
reinstall: str = config['reinstall']
|
||||
removepkg: str = config['removepkg']
|
||||
# Slackware commands
|
||||
installpkg: str = config['installpkg']
|
||||
reinstall: str = config['reinstall']
|
||||
removepkg: str = config['removepkg']
|
||||
|
||||
# Cli menu colors configs
|
||||
colors: str = config['colors']
|
||||
# Cli menu colors configs
|
||||
colors: str = config['colors']
|
||||
|
||||
# Wget options
|
||||
wget_options: str = config['wget_options']
|
||||
# Wget options
|
||||
wget_options: str = config['wget_options']
|
||||
|
||||
# Dialog utility
|
||||
dialog: str = config['dialog']
|
||||
# Dialog utility
|
||||
dialog: str = config['dialog']
|
||||
except KeyError as error:
|
||||
raise SystemExit(f"\nKeyError: {error}: in the configuration file "
|
||||
"'/etc/slpkg/slpkg.toml'\n")
|
||||
|
||||
# Creating the paths if not exists
|
||||
paths = [tmp_slpkg,
|
||||
|
|
Loading…
Reference in a new issue