objdictgen/networkedit.py
changeset 512 e84806c0ada4
parent 491 2ad3dedf6c6a
child 534 9012db875549
--- a/objdictgen/networkedit.py	Fri Aug 22 14:17:31 2008 +0200
+++ b/objdictgen/networkedit.py	Thu Aug 28 14:24:22 2008 +0200
@@ -705,13 +705,13 @@
                 find_index = True
                 index, subIndex = result
                 result = OpenPDFDocIndex(index, ScriptDirectory)
-                if type(result) == StringType:
+                if isinstance(result, (StringType, UnicodeType)):
                     message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
                     message.ShowModal()
                     message.Destroy()
         if not find_index:
             result = OpenPDFDocIndex(None, ScriptDirectory)
-            if type(result) == StringType:
+            if isinstance(result, (StringType, UnicodeType)):
                 message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
                 message.ShowModal()
                 message.Destroy()
@@ -817,7 +817,7 @@
             if dialog.ShowModal() == wx.ID_OK:
                 index, name, struct, number = dialog.GetValues()
                 result = self.Manager.AddMapVariableToCurrent(index, name, struct, number)
-                if type(result) != StringType:
+                if not isinstance(result, (StringType, UnicodeType)):
                     self.RefreshBufferState()
                     self.RefreshCurrentIndexList()
                 else: