@classmethod
def getSubtypes(cls, M):
"""Get the sub plugins declared in an instance"""
+ regex = re.compile(r'\s*(?P<brackets>[\'"])(.*?)(?P=brackets)\s*=>\s*(?P=brackets)(.*?)(?P=brackets)')
subtypes = {}
for t in cls._supportSubtypes:
path = cls.getTypeDirectory(t, M)
if not os.path.isfile(subpluginsfile):
continue
- regex = re.compile(r'^\s*(?P<brackets>[\'"])(.*)(?P=brackets)\s*=>\s*(?P=brackets)(.*)(?P=brackets)')
-
searchOpen = False
f = open(subpluginsfile, 'r')
for line in f:
if search:
for match in search:
subtypes[match[1]] = match[2].replace('admin/', '{admin}/')
+
+ # Exit when we find a semi-colon.
+ if searchOpen and ';' in line:
+ break
+
return subtypes
@classmethod