From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RgfXa-0002Mm-KY for garchives@archives.gentoo.org; Fri, 30 Dec 2011 16:42:46 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A677321C028; Fri, 30 Dec 2011 16:42:39 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 61EFC21C028 for ; Fri, 30 Dec 2011 16:42:39 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C60471B4037 for ; Fri, 30 Dec 2011 16:42:38 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 4422180043 for ; Fri, 30 Dec 2011 16:42:38 +0000 (UTC) From: "Anthony G. Basile" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Anthony G. Basile" Message-ID: <79489e6fbce17400d678363f48965dc9f13660de.blueness@gentoo> Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/config.py WebappConfig/permissions.py WebappConfig/server.py X-VCS-Directories: WebappConfig/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 79489e6fbce17400d678363f48965dc9f13660de Date: Fri, 30 Dec 2011 16:42:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 2aec5e41-17d7-4a20-ab24-03a43df90da3 X-Archives-Hash: 2e7a3a1eda49ab7679c78528b0615c1e commit: 79489e6fbce17400d678363f48965dc9f13660de Author: Arfrever gentoo org> AuthorDate: Fri Dec 30 16:40:58 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Dec 30 16:41:34 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/webapp-config= .git;a=3Dcommit;h=3D79489e6f Don't set unused exception variables. Reported-By: Arfrever gentoo.org> Signed-off-by: Anthony G. Basile gentoo.org> --- WebappConfig/config.py | 8 ++++---- WebappConfig/permissions.py | 4 ++-- WebappConfig/server.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WebappConfig/config.py b/WebappConfig/config.py index 0968dee..83406e8 100644 --- a/WebappConfig/config.py +++ b/WebappConfig/config.py @@ -680,7 +680,7 @@ class Config: result =3D None try: result =3D PermissionMap(self.maybe_get(permission)) - except Exception, e: + except Exception: OUT.die('You specified an invalid permission value for the' ' variable "' + permission + "'") return result @@ -689,7 +689,7 @@ class Config: result =3D None try: result =3D Perm.get_user(self.maybe_get(user)) - except KeyError, e: + except KeyError: OUT.die('You specified an invalid user value for the' ' variable "' + user + "'") return result @@ -698,7 +698,7 @@ class Config: result =3D None try: result =3D Perm.get_group(self.maybe_get(group)) - except KeyError, e: + except KeyError: OUT.die('You specified an invalid group value for the' ' variable "' + group + "'") return result @@ -1056,7 +1056,7 @@ class Config: if not i in ['pn', 'pvr']: try: print i.upper() + '=3D"' + self.config.get('USER= ', i) + '"' - except InterpolationSyntaxError,e: + except InterpolationSyntaxError: print '# Failed to evaluate: ' + i.upper() =20 sys.exit(0) diff --git a/WebappConfig/permissions.py b/WebappConfig/permissions.py index ea77d97..64d5f3d 100644 --- a/WebappConfig/permissions.py +++ b/WebappConfig/permissions.py @@ -206,7 +206,7 @@ def get_group(group): if type(group) !=3D types.IntType: try: ngroup =3D int(group) - except ValueError, e: + except ValueError: ngroup =3D -1 else: # The value is an integer @@ -254,7 +254,7 @@ def get_user(user): if type(user) !=3D types.IntType: try: nuser =3D int(user) - except ValueError, e: + except ValueError: nuser =3D -1 else: # The value is an integer diff --git a/WebappConfig/server.py b/WebappConfig/server.py index 8779475..ab17bd9 100644 --- a/WebappConfig/server.py +++ b/WebappConfig/server.py @@ -57,7 +57,7 @@ class Basic: =20 try: self.set_server_user() - except KeyError, e: + except KeyError: OUT.die('The user for the server type "' + self.name + '" does not exist!') =20