From 1e3a0ebe0282f2889ffd228512bfba8b97630b5d Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@cd1c1023-2f26-0410-ae45-c471fc1f0318> Date: Wed, 20 Feb 2008 19:08:14 +0000 Subject: [PATCH] fix broken license entries check git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1266 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/databaseTools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/databaseTools.py b/libraries/databaseTools.py index 38af688d1..83abadc4d 100644 --- a/libraries/databaseTools.py +++ b/libraries/databaseTools.py @@ -1359,7 +1359,7 @@ class etpDatabase: raise exceptionTools.CorruptionError("CorruptionError: I tried to insert a needed library but then, fetching it returned -1. There's something broken.") def addLicense(self,pkglicense): - if not pkglicense: + if not pkglicense.isalnum(): pkglicense = ' ' # workaround for broken license entries self.cursor.execute( 'INSERT into licenses VALUES ' @@ -2734,7 +2734,7 @@ class etpDatabase: self.commitChanges() def isLicenseAvailable(self,pkglicense): - if not pkglicense or not pkglicense.isalnum(): # workaround for packages without a license but just garbage + if not pkglicense.isalnum(): pkglicense = ' ' self.cursor.execute('SELECT idlicense FROM licenses WHERE license = (?)', (pkglicense,)) result = self.cursor.fetchone()