Skip to content

Commit

Permalink
deb_autopkg: conf: clean up variable references
Browse files Browse the repository at this point in the history
Always use path-based access, don't use vectors anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
  • Loading branch information
metux committed Nov 20, 2023
1 parent 457f8de commit 1ed919b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deb_autopkg/conf/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def load(self, fn):
if csdb_path is None:
warn("CSDB path not defined")

self.csdb = CSDB(csdb_path, self.get_cf(['csdb', 'sections']))
self.csdb = CSDB(csdb_path, self.get_cf(['csdb::sections']))

# load target configs
for t in self.get_cf('targets'):
Expand Down Expand Up @@ -111,7 +111,7 @@ def get_packages(self):

"""[private]"""
def _cf_dckbp(self, key, dflt, wmsg):
cf = self.get_cf(['dck-buildpackage', key])
cf = self.get_cf(['dck-buildpackage::'+key])
if cf is None:
info(wmsg)
return dflt
Expand Down
6 changes: 3 additions & 3 deletions deb_autopkg/conf/dutspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def get_post_deploy_reboot(self):

"""execute command on DUT"""
def dut_exec(self, cmd):
hostname = self.get_cf(['ssh', 'hostname'])
username = self.get_cf(['ssh', 'username'])
port = str(self.get_cf(['ssh', 'port']))
hostname = self.get_cf(['ssh::hostname'])
username = self.get_cf(['ssh::username'])
port = str(self.get_cf(['ssh::port']))

info("executing on DUT: %s" % repr(cmd))

Expand Down
2 changes: 1 addition & 1 deletion deb_autopkg/conf/pkgspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, name, spec, conf):
})

# add global defaults
self.default_addlist(self.conf['defaults','packages'])
self.default_addlist(self.conf['defaults::packages'])

"""get the global config"""
def get_conf(self):
Expand Down

0 comments on commit 1ed919b

Please sign in to comment.