[mirrorbrain-commits] r8128 - /trunk/mb/mb/conn.py

From: <poeml_at_mirrorbrain.org>
Date: Fri, 17 Sep 2010 12:17:04 -0000
Author: poeml
Date: Fri Sep 17 14:17:03 2010
New Revision: 8128

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8128&view=rev
Log:
mb list/edit/show/...: 
- In some situations, the fuzzy-matching on mirror identifiers made it impossible
  to select certain mirrors. Phillip Smith not only reported this issue but
  submitted a clever patch at the same time, which keeps the convenient behaviour
  but also allows for selection mirrors by their full name. Fixing issue #61.

Modified:
    trunk/mb/mb/conn.py

Modified: trunk/mb/mb/conn.py
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mb/mb/conn.py?rev=8128&r1=8127&r2=8128&view=diff
==============================================================================
--- trunk/mb/mb/conn.py (original)
+++ trunk/mb/mb/conn.py Fri Sep 17 14:17:03 2010
_at_@ -269,7 +269,11 @@
     
 
 def servers_match(server, match):
-    servers = server.select("""identifier LIKE '%%%s%%'""" % match)
+    servers = server.select("""identifier = '%s'""" % match)
+
+    if len(list(servers)) == 0:
+        servers = server.select("""identifier LIKE '%%%s%%'""" % match)
+
     return list(servers)
 
 




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Fri Sep 17 2010 - 12:17:06 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT