--- a/ConfigTreeNode.py Sat Aug 19 17:04:31 2017 +0300
+++ b/ConfigTreeNode.py Sat Aug 19 17:12:12 2017 +0300
@@ -276,10 +276,10 @@
# confnode asks for some LDFLAGS
if CTNLDFLAGS:
# LDFLAGS can be either string
- if type(CTNLDFLAGS) == type(str()):
+ if isinstance(CTNLDFLAGS, str):
LDFLAGS = [CTNLDFLAGS]
# or list of strings
- elif type(CTNLDFLAGS) == type(list()):
+ elif isinstance(CTNLDFLAGS, list):
LDFLAGS = CTNLDFLAGS[:]
else:
LDFLAGS = []
@@ -533,7 +533,7 @@
format(a1=CTNName, a2=CTNType))
# if CTNClass is a class factory, call it. (prevent unneeded imports)
- if type(CTNClass) == types.FunctionType:
+ if isinstance(CTNClass, types.FunctionType):
CTNClass = CTNClass()
# Eventualy Initialize child instance list for this class of confnode