aboutsummaryrefslogtreecommitdiff
path: root/standardskriver
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-27 16:18:08 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-06-27 16:18:08 +0200
commitcf1f4512d02f74402b478b645d2d5cc23a68520c (patch)
tree27ba585e5f35fb6941a3ba9c97836b40ac768d8a /standardskriver
parentf8cdcd5c2dd6ab6a824d2c03334cda6dd9de852c (diff)
downloadstandardskriver-cf1f4512d02f74402b478b645d2d5cc23a68520c.zip
standardskriver-cf1f4512d02f74402b478b645d2d5cc23a68520c.tar.gz
standardskriver-cf1f4512d02f74402b478b645d2d5cc23a68520c.tar.bz2
standardskriver: Let [groups.<SITE>] and [machine.<SITE>] sections override the more general [groups] and [machine] sections.
Diffstat (limited to 'standardskriver')
-rwxr-xr-xstandardskriver6
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):