[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47369] trunk/blender/release/scripts/ startup/bl_operators/wm.py: use fnmatch for reference globing rather then regex - regex overly complicates simple cases and wasnt being taken advantage of .
Campbell Barton
ideasman42 at gmail.com
Sun Jun 3 13:01:23 CEST 2012
Revision: 47369
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47369
Author: campbellbarton
Date: 2012-06-03 11:01:18 +0000 (Sun, 03 Jun 2012)
Log Message:
-----------
use fnmatch for reference globing rather then regex - regex overly complicates simple cases and wasnt being taken advantage of.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_operators/wm.py
Modified: trunk/blender/release/scripts/startup/bl_operators/wm.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/wm.py 2012-06-03 10:33:28 UTC (rev 47368)
+++ trunk/blender/release/scripts/startup/bl_operators/wm.py 2012-06-03 11:01:18 UTC (rev 47369)
@@ -845,11 +845,11 @@
@staticmethod
def _find_reference(rna_id, url_mapping):
- print("online manual check for: '%s' ... " % rna_id, end="")
- from re import match
+ print("online manual check for: '%s'... " % rna_id)
+ from fnmatch import fnmatch
for pattern, url_suffix in url_mapping:
- if match(pattern, rna_id):
- print("match found:", pattern)
+ if fnmatch(rna_id, pattern):
+ print(" match found: '%s' --> '%s'" % (pattern, url_suffix))
return url_suffix
print("match not found")
return None
More information about the Bf-blender-cvs
mailing list