diff --git a/app.py b/app.py index ca35bab..f9a1a6b 100644 --- a/app.py +++ b/app.py @@ -80,7 +80,7 @@ USER_LOG_DIR = os.path.join(USER_INV_DIR, u'logs') # ------------------------------------------------------------------ -if sys.platform == 'linux2': +if sys.platform in ('linux2', 'win32'): try: tmp_var = wx.GetXDisplay except AttributeError: diff --git a/invesalius/gui/import_network_panel.py b/invesalius/gui/import_network_panel.py index c4b9dab..034ecb9 100644 --- a/invesalius/gui/import_network_panel.py +++ b/invesalius/gui/import_network_panel.py @@ -674,7 +674,10 @@ class NodesPanel(wx.Panel): self.tree_node.SetColumnWidth(4, 80) self.hosts[0] = [True, "localhost", "", "invesalius"] - index = self.tree_node.InsertStringItem(sys.maxsize, "") + try: + index = self.tree_node.InsertStringItem(sys.maxsize, "") + except OverflowError: + index = self.tree_node.InsertStringItem(sys.maxint, "") self.tree_node.SetStringItem(index, 1, "localhost") self.tree_node.SetStringItem(index, 2, "") self.tree_node.SetStringItem(index, 3, "invesalius") -- libgit2 0.21.2