VMM/VMM: applied 'code compression' from v0.6.x(09b7e3fe29b3) to
VirtualMailManager.domainList().
--- a/VirtualMailManager/VirtualMailManager.py Sun Mar 21 09:17:26 2010 +0000
+++ b/VirtualMailManager/VirtualMailManager.py Mon Apr 05 10:22:51 2010 +0000
@@ -573,12 +573,7 @@
if pattern is not None:
if pattern.startswith('%') or pattern.endswith('%'):
like = True
- if pattern.startswith('%') and pattern.endswith('%'):
- domain = pattern[1:-1]
- elif pattern.startswith('%'):
- domain = pattern[1:]
- elif pattern.endswith('%'):
- domain = pattern[:-1]
+ domain = pattern.strip('%')
if not re.match(RE_DOMAIN_SRCH, domain):
raise VMMException(
_(u"The pattern ā%sā contains invalid characters.") %