← Back to team overview

enterprise-support team mailing list archive

[Bug 2016776] [NEW] Samba apport hook - AttributeError: 'NoneType' object has no attribute 'information'

 

Public bug reported:

Forwarding for Johan van Dijk, that hit this when reporting LP: #2015666

"""
when I run "ubuntu-bug /var/crash/_usr_sbin_smbd.0.crash" I get an error:
........................................................................................ERROR: hook /usr/share/apport/package-hooks/source_samba.py crashed:
...........Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport/report.py", line 228, in _run_hook
    symb['add_info'](report, ui)
...... File "/usr/share/apport/package-hooks/source_samba.py", line 93, in add_info
    ui.information("As a part of the bug reporting process, you'll be asked as series of questions to help provide a more descriptive bug report. Please answer the following questions to the best of your abilities. Afterwards, a browser will be opened to finish filing this as a bug in the Launchpad bug tracking system.")
.AttributeError: 'NoneType' object has no attribute 'information'
"""

I was not able to reproduce this filing from my own computer using his
_usr_sbin_smdb.0.crash file, however in looking at the source code, it
looks like add_info(report, ui) uses the ui parameter without first
checking if its defined.  So the fix would be to add a check and take
appropriate action, for example:

    if not ui:
        raise StopIteration # no GUI available for interacting with user

However, possibly this use case includes reporting bugs from headless
servers, which might be why ui is undefined.  That's probably a usecase
we want to support.  So in this case, instead of refusing to file a bug
report, it may be better to make some informed assumptions regarding the
files and logs to collect, and JFDI.

** Affects: samba (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to samba in Ubuntu.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/2016776

Title:
  Samba apport hook - AttributeError: 'NoneType' object has no attribute
  'information'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/2016776/+subscriptions