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 1QMZ4R-0003tQ-VP for garchives@archives.gentoo.org; Wed, 18 May 2011 05:13:20 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5429D1C039; Wed, 18 May 2011 05:13:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 15C5A1C039 for ; Wed, 18 May 2011 05:13:10 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 57E3A1B403D for ; Wed, 18 May 2011 05:13:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id C5CC654EBD for ; Wed, 18 May 2011 05:13:09 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <50b971a3724c2b5637d1ce3fc6587d6e3325f2ca.dol-sen@gentoo> Subject: [gentoo-commits] proj/layman:master commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/api.py X-VCS-Directories: layman/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 50b971a3724c2b5637d1ce3fc6587d6e3325f2ca Date: Wed, 18 May 2011 05:13:09 +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: X-Archives-Hash: 693c2f8d1acc6f2d85cf3349dab8445f commit: 50b971a3724c2b5637d1ce3fc6587d6e3325f2ca Author: dol-sen gmail com> AuthorDate: Wed May 18 05:12:50 2011 +0000 Commit: Brian Dolbec gmail com> CommitDate: Wed May 18 05:12:50 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/layman.git;a=3D= commit;h=3D50b971a3 fix a false -d success for non-existent overlay. fix a couple error messa= ges. fix a long line --- layman/api.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/layman/api.py b/layman/api.py index 7e4ad0e..30f850c 100644 --- a/layman/api.py +++ b/layman/api.py @@ -111,13 +111,15 @@ class LaymanAPI(object): results =3D [] for ovl in repos: if not self.is_installed(ovl): - results.append(True) + self._error("Repository '"+ovl+"': was not installed") + results.append(False) continue try: - self._get_installed_db().delete(self._get_installed_db()= .select(ovl)) + self._get_installed_db().delete( + self._get_installed_db().select(ovl)) results.append(True) except Exception as e: - self._error(ERROR_INTERNAL_ERROR, + self._error( "Failed to disable repository '"+ovl+"':\n"+str(= e)) results.append(False) self.get_installed(dbreload=3DTrue) @@ -148,8 +150,7 @@ class LaymanAPI(object): self._get_installed_db().add(self._get_remote_db().selec= t(ovl), quiet=3DTrue) results.append(True) except Exception as e: - self._error(ERROR_INTERNAL_ERROR, - "Failed to enable repository '"+ovl+"' : "+str(e= )) + self._error("Failed to enable repository '"+ovl+"' : "+s= tr(e)) results.append(False) self.get_installed(dbreload=3DTrue) if False in results: