equal
deleted
inserted
replaced
274 LocationCFilesAndCFLAGS = [] |
274 LocationCFilesAndCFLAGS = [] |
275 |
275 |
276 # confnode asks for some LDFLAGS |
276 # confnode asks for some LDFLAGS |
277 if CTNLDFLAGS: |
277 if CTNLDFLAGS: |
278 # LDFLAGS can be either string |
278 # LDFLAGS can be either string |
279 if type(CTNLDFLAGS) == type(str()): |
279 if isinstance(CTNLDFLAGS, str): |
280 LDFLAGS = [CTNLDFLAGS] |
280 LDFLAGS = [CTNLDFLAGS] |
281 # or list of strings |
281 # or list of strings |
282 elif type(CTNLDFLAGS) == type(list()): |
282 elif isinstance(CTNLDFLAGS, list): |
283 LDFLAGS = CTNLDFLAGS[:] |
283 LDFLAGS = CTNLDFLAGS[:] |
284 else: |
284 else: |
285 LDFLAGS = [] |
285 LDFLAGS = [] |
286 |
286 |
287 # recurse through all children, and stack their results |
287 # recurse through all children, and stack their results |
531 except KeyError: |
531 except KeyError: |
532 raise Exception(_("Cannot create child {a1} of type {a2} "). |
532 raise Exception(_("Cannot create child {a1} of type {a2} "). |
533 format(a1=CTNName, a2=CTNType)) |
533 format(a1=CTNName, a2=CTNType)) |
534 |
534 |
535 # if CTNClass is a class factory, call it. (prevent unneeded imports) |
535 # if CTNClass is a class factory, call it. (prevent unneeded imports) |
536 if type(CTNClass) == types.FunctionType: |
536 if isinstance(CTNClass, types.FunctionType): |
537 CTNClass = CTNClass() |
537 CTNClass = CTNClass() |
538 |
538 |
539 # Eventualy Initialize child instance list for this class of confnode |
539 # Eventualy Initialize child instance list for this class of confnode |
540 ChildrenWithSameClass = self.Children.setdefault(CTNType, list()) |
540 ChildrenWithSameClass = self.Children.setdefault(CTNType, list()) |
541 # Check count |
541 # Check count |