Bug 195457

Summary: New: KeyError: 'DOMAIN' while browsing for samba printers
Product: [Fedora] Fedora Reporter: Bernhard Ege <bme>
Component: system-config-printerAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-12 06:00:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Bernhard Ege 2006-06-15 11:54:30 UTC
NOTE: This is a resubmission because of the bugzilla disc crash. Was previously
known as bug 194589. Also note, my suggested fix is not entirely correct but is
close (previous (and now lost) bugzilla fix was better). 

Description of problem:

When adding a new smb printer, system-config-printer fails with this error:
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 866, in browse_smb_hosts
  store.set_value (iter, 0, d['DOMAIN'])
KeyError: 'DOMAIN' 


Version-Release number of selected component (if applicable):

system-config-printer-0.6.151.7-1 

How reproducible:

Add the first samba printer (which worked) and then try to add another samba
printer (which failes with the above error every time).

Steps to Reproduce:
1. system-config-printer
2. Click: New
3. Select SMB and wait for error.
  
Actual results:

Error displays and samba list of printers newer shows up.

Expected results:

No error and list of samba printers/domains visible and selectable.

Additional info:

Error located in:
/usr/share/printconf/util/pysmb.py 

In function: get_domain_list 

dict = { 'IP': ip }

should be:

dict = { 'IP': ip , 'DOMAIN': dom } 

This at least prevents the error from occuring but I am not 100% sure the fix is
correct.

Comment 1 Tim Waugh 2006-06-15 12:10:15 UTC
Fixed in CVS. (Thanks for re-filing this..)

Comment 2 Tim Waugh 2006-08-16 11:26:10 UTC
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.

Comment 3 Bernhard Ege 2006-08-16 13:02:17 UTC
Tested and works for me. :-)