For bug #180079, fix a KeyError so that a search for the empty string will go ahead...
authorZac Medico <zmedico@gentoo.org>
Mon, 28 May 2007 07:11:01 +0000 (07:11 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 28 May 2007 07:11:01 +0000 (07:11 -0000)
svn path=/main/trunk/; revision=6648

pym/emerge/__init__.py

index 2cff1ed41162ba491f0afed6f02d183345b3835f..193c7c33eb37c6d72d79266cfd0b66de95664156 100644 (file)
@@ -398,10 +398,10 @@ class search:
                print "Searching...   ",
 
                regexsearch = False
-               if self.searchkey[0] == '%':
+               if self.searchkey.startswith('%'):
                        regexsearch = True
                        self.searchkey = self.searchkey[1:]
-               if self.searchkey[0] == '@':
+               if self.searchkey.startswith('@'):
                        match_category = 1
                        self.searchkey = self.searchkey[1:]
                if regexsearch: