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 1RggdV-0001qP-Ub for garchives@archives.gentoo.org; Fri, 30 Dec 2011 17:52:58 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 58FF821C0B2; Fri, 30 Dec 2011 17:52:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2C9B021C0B2 for ; Fri, 30 Dec 2011 17:52:40 +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 A580E1B4017 for ; Fri, 30 Dec 2011 17:52:39 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 1F31080043 for ; Fri, 30 Dec 2011 17:52:39 +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: <5b1fd173f1709b0eefc4fd6276756e914837f156.blueness@gentoo> Subject: [gentoo-commits] proj/webapp-config:master commit in: WebappConfig/ X-VCS-Repository: proj/webapp-config X-VCS-Files: WebappConfig/permissions.py WebappConfig/wrapper.py X-VCS-Directories: WebappConfig/ X-VCS-Committer: blueness X-VCS-Committer-Name: Anthony G. Basile X-VCS-Revision: 5b1fd173f1709b0eefc4fd6276756e914837f156 Date: Fri, 30 Dec 2011 17:52:39 +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: 20f30288-5edb-4ef8-b269-884477f714b7 X-Archives-Hash: ea01483cf1db26b5bb57addf4b52ac95 commit: 5b1fd173f1709b0eefc4fd6276756e914837f156 Author: Arfrever gentoo org> AuthorDate: Fri Dec 30 17:52:08 2011 +0000 Commit: Anthony G. Basile gentoo org> CommitDate: Fri Dec 30 17:52:22 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/webapp-config= .git;a=3Dcommit;h=3D5b1fd173 Use isinstance() for compatibility with Python 3. Reported-By: Arfrever gentoo.org> Signed-off-by: Anthony G. Basile gentoo.org> --- WebappConfig/permissions.py | 6 +++--- WebappConfig/wrapper.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WebappConfig/permissions.py b/WebappConfig/permissions.py index 13b2c3f..0bf99ea 100644 --- a/WebappConfig/permissions.py +++ b/WebappConfig/permissions.py @@ -25,7 +25,7 @@ __version__ =3D "$Id: permissions.py 129 2005-11-06 12:= 46:31Z wrobel $" # Dependencies # ----------------------------------------------------------------------= -- =20 -import re, types, grp, pwd +import re, grp, pwd =20 # =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D # Permission Helper @@ -203,7 +203,7 @@ def get_group(group): ngroup =3D -1 =20 # Can we transform the value to an integer? - if type(group) !=3D types.IntType: + if not isinstance(group, int): try: ngroup =3D int(group) except ValueError: @@ -251,7 +251,7 @@ def get_user(user): nuser =3D -1 =20 # Can we transform the value to an integer? - if type(user) !=3D types.IntType: + if not isinstance(user, int): try: nuser =3D int(user) except ValueError: diff --git a/WebappConfig/wrapper.py b/WebappConfig/wrapper.py index e0d1e87..fd4b010 100644 --- a/WebappConfig/wrapper.py +++ b/WebappConfig/wrapper.py @@ -26,7 +26,7 @@ __version__ =3D "$Id: wrapper.py 283 2006-04-20 22:53:0= 4Z wrobel $" # Dependencies # ----------------------------------------------------------------------= -- =20 -import os, types, string +import os, string =20 from WebappConfig.debug import OUT =20 @@ -133,7 +133,7 @@ def package_installed(full_name, pm): t =3D portage.db[portage.root]["vartree"].dbapi.match(full_= name) # catch the "ambiguous package" Exception except ValueError as e: - if type(e[0]) =3D=3D types.ListType: + if isinstance(e[0], list): t =3D [] for cp in e[0]: t +=3D portage.db[portage.root]["vartree"].dbapi.mat= ch(cp)