#!/usr/bin/python

# Print out all queues that are configured as neither CLUSTER or DORM
# type in Moira

import cups
import moira

moira.connect()

for p in cups.Connection().getPrinters().keys():
    if list(moira.query('gprn', p))[0]['type'] not in ('DORM', 'CLUSTER'):
        print p
