--- /home/phahn/GIT/branches/ucs-3.1/ucs-3.1-2/base/univention-config-registry/python/univention/config_registry/frontend.py 2013-04-25 07:34:22.557864398 +0200 +++ /tmp/frontend.py 2013-05-24 11:20:20.921381541 +0200 @@ -310,10 +310,10 @@ search_keys |= search_all if not args: - regex = [re.compile('')] + search = lambda x: True else: try: - regex = [re.compile(_) for _ in args] + search = re.compile('|'.join(('(?:%s)' % (_,) for _ in args))).search except re.error, ex: print >> sys.stderr, 'E: invalid regular expression: %s' % (ex,) sys.exit(1) @@ -352,13 +352,11 @@ all_vars[key] = (value, None, scope) for key, (value, vinfo, scope) in all_vars.items(): - for reg in regex: - if ((search_keys and reg.search(key)) or - (search_values and value and reg.search(value)) or + if ((search_keys and search(key)) or + (search_values and value and search(value)) or (search_all and vinfo and - reg.search(vinfo.get('description', '')))): + search(vinfo.get('description', '')))): print_variable_info_string(key, value, vinfo, details=details) - break if _SHOW_EMPTY & details and not OPT_FILTERS['shell'][2]: patterns = {}