On Wednesday 02 September 2009, Seth Vidal wrote: > just b/c it looks like a glob doesn't mean it IS a glob: > /usr/bin/[ is a legit file in coreutils but it looks (and acts) > just like a glob - so we need to do an ='s search even if it looks > like a glob. This makes me cranky.
I'd argue that the presence of "[" alone in a string doesn't make it a glob candidate - it needs to be followed by a "]" for that. Ditto for "]" without a preceding "[". And there also needs to be something between them. So maybe this in re_glob() would be a better fix: - _re_compiled_glob_match = re.compile('.*[\*\?\[\]].*') + _re_compiled_glob_match = re.compile('.*([*?]|\[.+\])') (while at it, dropped some unnecessary backslashes and trailing .*) _______________________________________________ Yum-devel mailing list Yum-devel@lists.baseurl.org http://lists.baseurl.org/mailman/listinfo/yum-devel