Lines 375-381
Link Here
|
375 |
|
375 |
|
376 |
for location in hive.get_folders("/printing/nearest/locations"): |
376 |
for location in hive.get_folders("/printing/nearest/locations"): |
377 |
location2printer[location] = hive.get_string_list("/printing/nearest/locations/%s/printers" % location, []) |
377 |
location2printer[location] = hive.get_string_list("/printing/nearest/locations/%s/printers" % location, []) |
378 |
if hive.get_bool("/printing/nearest/locations/%s/useforunknown" % location, 0): |
378 |
if hive.get_bool("/printing/nearest/locations/%s/useforunknown" % location, False): |
379 |
hw2printers["unknown"] += hive.get_string_list("/printing/nearest/locations/%s/printers" % location, []) |
379 |
hw2printers["unknown"] += hive.get_string_list("/printing/nearest/locations/%s/printers" % location, []) |
380 |
|
380 |
|
381 |
for printer in get_current_printerlist(username=None): |
381 |
for printer in get_current_printerlist(username=None): |
Lines 457-463
Link Here
|
457 |
# We store the usernames for all sessions with an hardware |
457 |
# We store the usernames for all sessions with an hardware |
458 |
# address that is unknown to the printer database under the key |
458 |
# address that is unknown to the printer database under the key |
459 |
# 'unknown'. It is later used to construct the list of printers |
459 |
# 'unknown'. It is later used to construct the list of printers |
460 |
# based on locations that has the useforunknown=1 setting. |
460 |
# based on locations that has the useforunknown=true setting. |
461 |
if not hw2printer.has_key(hwaddr): |
461 |
if not hw2printer.has_key(hwaddr): |
462 |
hwaddr = "unknown" |
462 |
hwaddr = "unknown" |
463 |
|
463 |
|
Lines 539-545
Link Here
|
539 |
# |
539 |
# |
540 |
# Hardware address might be 'unknown'. There is an entry for that |
540 |
# Hardware address might be 'unknown'. There is an entry for that |
541 |
# as well in hw2printer, including any printers that are listed in |
541 |
# as well in hw2printer, including any printers that are listed in |
542 |
# locations that have useforunknown=1 |
542 |
# locations that have useforunknown=true |
543 |
allowed_printers = {} |
543 |
allowed_printers = {} |
544 |
for hwaddr in hwaddrs: |
544 |
for hwaddr in hwaddrs: |
545 |
for printer in hw2printer[hwaddr]: |
545 |
for printer in hw2printer[hwaddr]: |