Skip to content

Commit

Permalink
cli: Read global configuration
Browse files Browse the repository at this point in the history
Added the possibility to add global run-time configuration to the NIPAP
CLI in /etc/nipaprc. The global file, if exists, will be read first and
any option set in the local ~/.nipaprc file will override what's set in
the global file.
  • Loading branch information
garberg committed Aug 13, 2024
1 parent 703192b commit 346f261
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nipap-cli/nipap
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ if __name__ == '__main__':
}
# read configuration
cfg = configparser.ConfigParser(cfg_defaults, allow_no_value=True)
cfg.read(userrcfile)
cfg.read(['/etc/nipaprc', userrcfile])
nipap_cli.nipap_cli.cfg = cfg

if cfg.has_section("tracing"):
Expand Down

0 comments on commit 346f261

Please sign in to comment.