[Bug 1844682] Re: ubuntu-bug _usr_bin_sudo.crash yields AttributeError

Benjamin Drung 1844682 at bugs.launchpad.net
Tue Jul 26 14:36:18 UTC 2022


yesno returns None. The API says that this can be the case:

```
    def yesno(self, text):
        """Show a yes/no question.

        Return True if the user selected "Yes", False if selected "No" or
        "None" on cancel/dialog closing.
        """
```

So the culprit is /usr/share/apport/package-hooks/source_sudo.py which
is provided by the sudo package. So adjust the package accordingly.

** Package changed: apport (Ubuntu) => sudo (Ubuntu)

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to sudo in Ubuntu.
https://bugs.launchpad.net/bugs/1844682

Title:
  ubuntu-bug _usr_bin_sudo.crash yields AttributeError

Status in sudo package in Ubuntu:
  New

Bug description:
  While digging through /var/crash folder I've realized that I do have a
  few crashes involving sudo. To be exact, couple of files names
  _usr_bin_sudo.N.crash

  Logically, I've tried uploading those to Ubuntu error tracker using
  following:

  ubuntu-bug  /var/crash/_usr_bin_sudo.0.crash

  It failed mumbling about permissions. So, stupid but common next step:
  sudo ubuntu-bug  /var/crash/_usr_bin_sudo.0.crash

  yielded me the following Python Traceback:

  ** (apport-gtk:6825): WARNING **: Couldn't connect to accessibility bus: Failed to connect to socket /tmp/dbus-ILURWtYdgA: Connection refused
  ERROR: hook /usr/share/apport/package-hooks/source_sudo.py crashed:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport/report.py", line 197, in _run_hook
      symb['add_info'](report, ui)
    File "/usr/share/apport/package-hooks/source_sudo.py", line 20, in add_info
      response = ui.yesno("The contents of your /etc/sudoers file may help developers diagnose your bug more quickly, however, it may contain sensitive information.  Do you want to include it in your bug report?")
  AttributeError: 'NoneType' object has no attribute 'yesno'

  It seems that in the end, something got uploaded to the server, but it
  didn't make any indication of successful upload what-so-ever.
  Repeating the same sequence of actions does not yield the same Python
  Traceback and exits gracefully.

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: apport 2.20.1-0ubuntu2.19
  ProcVersionSignature: Ubuntu 4.15.0-64.73~16.04.1-generic 4.15.18
  Uname: Linux 4.15.0-64-generic x86_64
  ApportLog:
   
  ApportVersion: 2.20.1-0ubuntu2.19
  Architecture: amd64
  Date: Thu Sep 19 17:09:29 2019
  PackageArchitecture: all
  ProcEnviron:
   LANGUAGE=en_US
   TERM=xterm-256color
   PATH=(custom, no user)
   LANG=en_US.UTF-8
   SHELL=/bin/bash
  SourcePackage: apport
  UpgradeStatus: No upgrade log present (probably fresh install)

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




More information about the foundations-bugs mailing list