]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - objdictgen/objdictgen.py
Some instance type test improved
[CanFestival-3.git] / objdictgen / objdictgen.py
index 7b7afbe23b0a6f2e3ec5b0d9a645e9b4a9bdecde..84ac9ab900b25c075d3831877ee651663a72f228 100644 (file)
@@ -57,7 +57,7 @@ if __name__ == '__main__':
         if os.path.isfile(fileIn):
             print "Parsing input file"
             result = manager.OpenFileInCurrent(fileIn)
-            if type(result) != UnicodeType:
+            if not isinstance(result, (StringType, UnicodeType)):
                 Node = result
             else:
                 print result
@@ -67,7 +67,7 @@ if __name__ == '__main__':
             sys.exit(-1)
         print "Writing output file"
         result = manager.ExportCurrentToCFile(fileOut)
-        if type(result) == UnicodeType:
+        if isinstance(result, (UnicodeType, StringType)):
             print result
             sys.exit(-1)
         print "All done"