Description of problem: When trying to browse for smb printers, /usr/share/printconf/util/addQueue.py prints out a python exception. Version-Release number of selected component (if applicable): system-config-printer-gui-0.6.151.7-1 How reproducible: Always. This will trigger when pysmb.get_domain_list() returns an empty dictionary. Steps to Reproduce: 1. system-config-printer 2. "Action" -> "New Queue" -> queue type: "SMB" Actual results: prints out: Traceback (most recent call last): File "/usr/share/printconf/util/addQueue.py", line 524, in type_menu_changed self.browse_smb_hosts () File "/usr/share/printconf/util/addQueue.py", line 869, in browse_smb_hosts dummy = store.append (iter) UnboundLocalError: local variable 'iter' referenced before assignment on terminal. Expected results: No python programming errors. Additional info: Will attach a simple patch to fix this. The util/addQueue.py file mixes Tabs and Spaces for indentation. This can cause real bugs in the Python programming language. Would you consider configuring your editor differently? Does "printconf" have an upstream CVS or mailing list where I can help fix this kind of bugs?
Created attachment 130721 [details] Assign "iter" to None before the loop, check it afterwards.
Fixed in CVS. Future FC5 updates should contain the fix. FWIW, printconf has been entirely re-written as system-config-printer for Fedora Core 6.
Please try this test update: https://www.redhat.com/archives/fedora-test-list/2006-August/msg00259.html You should be able to get this using the command: yum --enablerepo=updates-testing update 'system-config-printer*' as root.
Reported confirms fix.