@@ -54,7 +54,7 @@ def re_glob(s):
5454 """ Tests if a string is a shell wildcard. """
5555 global _re_compiled_glob_match
5656 if _re_compiled_glob_match is None :
57- _re_compiled_glob_match = re .compile ('[*?]|\[.+\]' ).search
57+ _re_compiled_glob_match = re .compile (r '[*?]|\[.+\]' ).search
5858 return _re_compiled_glob_match (s )
5959
6060_re_compiled_full_match = None
@@ -63,7 +63,7 @@ def re_full_search_needed(s):
6363 global _re_compiled_full_match
6464 if _re_compiled_full_match is None :
6565 # A glob, or a "." or "-" separator, followed by something (the ".")
66- one = re .compile ('.*([-.*?]|\[.+\]).' ).match
66+ one = re .compile (r '.*([-.*?]|\[.+\]).' ).match
6767 # Any epoch, for envra
6868 two = re .compile ('[0-9]+:' ).match
6969 _re_compiled_full_match = (one , two )
@@ -484,16 +484,16 @@ def repo_gen_decompress(filename, generated_name, cached=False):
484484 return decompress (filename , dest = dest , check_timestamps = True , fn_only = cached )
485485
486486def read_in_items_from_dot_dir (thisglob , line_as_list = True ):
487- """ Takes a glob of a dir (like /etc/foo.d/\*.foo) returns a list of all the
488- lines in all the files matching that glob, ignores comments and blank
487+ """ Takes a glob of a dir (like /etc/foo.d/\\ *.foo) returns a list of all
488+ the lines in all the files matching that glob, ignores comments and blank
489489 lines, optional paramater 'line_as_list tells whether to treat each line
490490 as a space or comma-separated list, defaults to True.
491491 """
492492 results = []
493493 for fname in glob .glob (thisglob ):
494494 with open (fname ) as f :
495495 for line in f :
496- if re .match ('\s*(#|$)' , line ):
496+ if re .match (r '\s*(#|$)' , line ):
497497 continue
498498 line = line .rstrip () # no more trailing \n's
499499 line = line .lstrip () # be nice
0 commit comments