Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if sNSURI[0] == '"': sNSURI = sNSURI[1:]
if sNSURI[-1] == '"': sNSURI = sNSURI[0:-1]
print "- NameSpace: %s=%s"%(sNSName, sNSURI)
self.ltNSNameURI.append( (sNSName, sNSURI) )
#Now loop over other sections, which should define a set of decorations
decos = self.cfg.get(self.sSectionGeneral, "decos")
lsDeco = decos.split()
self.lDeco = [] #a list
# for sect in self.cfg.sections(): #random order!!! :-(
for sect in lsDeco:
if sect in lReservedSections: continue
sType = self.cfg.get(sect, "type") #get the name of the associated Python class
try:
cls=deco.Deco.getDecoClass(sType) #get the associated Python class
obj = cls(self.cfg, sect, None) #let the class creates an instance using the details in the config file
self.lDeco.append(obj)
#print "-", str(obj)
except Exception, e:
print "ERROR: ", e
print "--- Done ---"