~ubuntu-branches/ubuntu/saucy/command-not-found/saucy

« back to all changes in this revision

Viewing changes to CommandNotFound/CommandNotFound.py

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2012-01-12 14:21:01 UTC
  • Revision ID: package-import@ubuntu.com-20120112142101-l582jc5iuwiy7bca
Tags: 0.2.45ubuntu3
Use the right group name ('sudo', not 'sudoers').  LP: #893842.

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        for filename in os.listdir(os.path.sep.join([data_dir, self.programs_dir])):
117
117
            self.programs.append(ProgramDatabase(os.path.sep.join([data_dir, self.programs_dir, filename])))
118
118
        try:
119
 
            self.user_can_sudo = grp.getgrnam("admin")[2] in posix.getgroups()
 
119
            self.user_can_sudo = grp.getgrnam("admin")[2] in posix.getgroups() or grp.getgrnam("sudo")[2] in posix.getgroups()
120
120
        except KeyError:
121
121
            self.user_can_sudo = False
122
122