From f59418dbe9b9211898aa2f5eaedd17e6e87de7fd Mon Sep 17 00:00:00 2001 From: Michael Hanselmann <hansmi@google.com> Date: Wed, 13 Jan 2010 17:33:56 +0100 Subject: [PATCH] build-bash-completion: Fix a few pylint warnings Signed-off-by: Michael Hanselmann <hansmi@google.com> Reviewed-by: Iustin Pop <iustin@google.com> --- autotools/build-bash-completion | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/autotools/build-bash-completion b/autotools/build-bash-completion index aa130d42f..103fb9c79 100755 --- a/autotools/build-bash-completion +++ b/autotools/build-bash-completion @@ -19,9 +19,7 @@ # 02110-1301, USA. -import optparse import os -import sys import re from cStringIO import StringIO @@ -263,6 +261,8 @@ class CompletionWriter: self.args = args for opt in opts: + # While documented, these variables aren't seen as public attributes by + # pylint. pylint: disable-msg=W0212 opt.all_names = sorted(opt._short_opts + opt._long_opts) def _FindFirstArgument(self, sw): @@ -591,7 +591,7 @@ def GetCommands(filename, module): """ try: commands = getattr(module, "commands") - except AttributeError, err: + except AttributeError: raise Exception("Script %s doesn't have 'commands' attribute" % filename) -- GitLab