Rev 55: Don't fail on no search string. in http://people.ubuntu.com/~robertc/baz2.0/plugins/search/trunk

Robert Collins robertc at robertcollins.net
Thu Aug 28 04:50:39 BST 2008


At http://people.ubuntu.com/~robertc/baz2.0/plugins/search/trunk

------------------------------------------------------------
revno: 55
revision-id: robertc at robertcollins.net-20080828035037-nsnsrcwhossdod6v
parent: robertc at robertcollins.net-20080828021347-93j6wcl14ecp4z6a
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Thu 2008-08-28 13:50:37 +1000
message:
  Don't fail on no search string.
modified:
  index.py                       index.py-20080608055509-hnimeek7q8tctkqf-2
=== modified file 'index.py'
--- a/index.py	2008-08-27 08:37:30 +0000
+++ b/index.py	2008-08-28 03:50:37 +0000
@@ -1370,6 +1370,8 @@
 def query_from_regex(regex):
     """Convert a regex into a bzr-search query."""
     # Most trivial implementation ever
+    if not regex:
+        return None
     if regex.count("\\b") != 2:
         return None
     regex = regex[2:-2]




More information about the bazaar-commits mailing list