diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-27 16:18:08 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2017-06-27 16:18:08 +0200 |
commit | cf1f4512d02f74402b478b645d2d5cc23a68520c (patch) | |
tree | 27ba585e5f35fb6941a3ba9c97836b40ac768d8a | |
parent | f8cdcd5c2dd6ab6a824d2c03334cda6dd9de852c (diff) | |
download | standardskriver-cf1f4512d02f74402b478b645d2d5cc23a68520c.tar.gz standardskriver-cf1f4512d02f74402b478b645d2d5cc23a68520c.tar.bz2 standardskriver-cf1f4512d02f74402b478b645d2d5cc23a68520c.zip |
standardskriver: Let [groups.<SITE>] and [machine.<SITE>] sections override the more general [groups] and [machine] sections.
-rwxr-xr-x | standardskriver | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/standardskriver b/standardskriver index 26d5e0d..b778a9f 100755 --- a/standardskriver +++ b/standardskriver @@ -128,9 +128,10 @@ p.wait() #print (groups) def get_group_match(): - group_sections = ['groups'] + group_sections = [] if site_id: group_sections.append('groups.{site}'.format(site=site_id)) + group_sections.append('groups') for section in group_sections: try: for group, printer in cfg.items(section): @@ -140,9 +141,10 @@ def get_group_match(): return None def get_machine_match(): - machine_sections = ['machine'] + machine_sections = [] if site_id: machine_sections.append('machine.{site}'.format(site=site_id)) + machine_sections.append('machine') for section in machine_sections: try: for machine, printer in cfg.items(section): |