do not depend on types.StringTypes anymore
[sfa.git] / clientbin / getNodes.py
index d1c1623..ec2e4a2 100644 (file)
@@ -5,6 +5,8 @@ import os
 from optparse import OptionParser
 from pprint import pprint
 
+from sfa.util.py23 import StringType
+
 def create_parser():
     command = sys.argv[0]
     argv = sys.argv[1:]
@@ -34,7 +36,7 @@ def print_dict(rdict, options, counter=1):
     if not isinstance(rdict, dict):
         raise "%s not a dict" % rdict 
     for (key, value) in rdict.iteritems():
-        if isinstance(value, StringTypes):
+        if isinstance(value, StringType):
             if (attributes and key in attributes) or not attributes:
                 print tab * counter + "%s: %s" % (key, value)
         elif isinstance(value, list):