diff --git a/cccli/tagdisplay.py b/cccli/tagdisplay.py index a00b3adea9ea84207260dad3a1c3c18ee535d9a8..9e1acd87ac742cda200185676f997f281e3d477a 100644 --- a/cccli/tagdisplay.py +++ b/cccli/tagdisplay.py @@ -12,6 +12,7 @@ import re import math import ConfigParser import time +import fnmatch class TagDisplay(object): '''Handle tagdisplay stuff''' @@ -60,8 +61,9 @@ class TagDisplay(object): if bool(self.option.get("quotespace", False)): if re.search("\s", tagvalue) is not None: tagvalue = "'%s'"%re.sub("'", "\'", tagvalue) - if tagname in self.tagtype and self.tagtype[tagname] in self.types: - return getattr(self, "type_%s"%self.tagtype[tagname])(tagvalue) + l = [ x for x in self.tagtype if fnmatch.fnmatch(tagname, x) ] + if len(l) > 0 and self.tagtype[l[0]] in self.types: + return getattr(self, "type_%s"%self.tagtype[l[0]])(tagvalue) return tagvalue def type_lower(self, value):