use StringTypes instead of str when determining the type
authorTony Mack <tmack@cs.princeton.edu>
Tue, 22 Dec 2009 02:51:17 +0000 (02:51 +0000)
committerTony Mack <tmack@cs.princeton.edu>
Tue, 22 Dec 2009 02:51:17 +0000 (02:51 +0000)
sfa/util/rspec.py

index 515dd86..c030171 100644 (file)
@@ -27,10 +27,10 @@ class RSpec:
         self.dict = {}
         self.schemaDict = {}
         self.NSURL = NSURL 
-        if xml: 
+        if xml:
             if type(xml) == file:
                 self.parseFile(xml)
-            if type(xml) == str:
+            if type(xml) in StringTypes:
                 self.parseString(xml)
             self.dict = self.toDict() 
         if xsd: