From 2f611866acc5af5ccc24f2c5a5e958ae3a0e5404 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 13:33:39 +0100 Subject: [PATCH 1/8] update travis.yml --- .travis.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index f872394d..c0e82551 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,15 @@ language: python python: - "3.7" -#services: -# - xvfb +services: + - xvfb -env: - -DISPLAY=:99.0 +#env: +# -DISPLAY=:99.0 + +#before_install: +# - sh -e /etc/init.d/xvfb start -before_install: - - sh -e /etc/init.d/xvfb start - #before_script: # - "export DISPLAY=:99.0" # - "sh -e /etc/init.d/xvfb start" From 967cbc2793260dc433e265ba5936d038b93147a3 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 13:59:53 +0100 Subject: [PATCH 2/8] update travis.yml --- .travis.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index c0e82551..460aee40 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,17 +5,6 @@ python: services: - xvfb -#env: -# -DISPLAY=:99.0 - -#before_install: -# - sh -e /etc/init.d/xvfb start - -#before_script: -# - "export DISPLAY=:99.0" -# - "sh -e /etc/init.d/xvfb start" -# - sleep 3 # give xvfb some time to start - sudo: true #cache: pip @@ -53,4 +42,4 @@ install: - pip install PyPubSub==3.3.0 pyyaml ruamel.yaml # command to run -script: travis_wait 20 python devsimpy.py examples/model0.dsp stop \ No newline at end of file +script: travis_wait 20 python devsimpy.py examples/model0.dsp quit \ No newline at end of file From 9446114ea1ac9cddc5a03dae779013020b957322 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 14:05:16 +0100 Subject: [PATCH 3/8] bug fix --- wxPyMail.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wxPyMail.py b/wxPyMail.py index 56325e4d..fa877cbc 100644 --- a/wxPyMail.py +++ b/wxPyMail.py @@ -21,6 +21,8 @@ import urllib.request, urllib.parse, urllib.error import wx +_ = wx.GetTranslation + try: from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase From debf14ce657951af4cca3309075bfdcb8e20c351 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 14:08:45 +0100 Subject: [PATCH 4/8] bug fix --- devsimpy.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/devsimpy.py b/devsimpy.py index be144505..931f6035 100644 --- a/devsimpy.py +++ b/devsimpy.py @@ -2155,9 +2155,12 @@ def OnClose(self, event): self.app.SetExceptionHook() - # Call after the loading diagram method whic depends on the invocked command line - wx.CallAfter(self.app.frame.OnLoadDiagram) - + # Call after the loading diagram method which depends on the invocked command line + try: + wx.CallAfter(self.app.frame.OnLoadDiagram) + except: + pass + def ShowMain(self): """ Shows the main application (DEVSimPy). """ From df2436f23aabd09f1e9c07365fa677a9e3a75feb Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 14:23:56 +0100 Subject: [PATCH 5/8] bug fix --- Components.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Components.py b/Components.py index 3042bf10..2d303d24 100644 --- a/Components.py +++ b/Components.py @@ -178,9 +178,9 @@ def Load(filename, label): """ Load python file from filename """ filename = filename.strip() - assert(filename.endswith(('.py','.pyc'))) + assert(filename.endswith(('.py','.pyc'))),"File %s is not python file!"%filename - return BlockFactory.CreateBlock( python_file = filename, label = label) + return BlockFactory.CreateBlock(python_file = filename, label = label) class GenericComponent: """ From b7bab76b7bd225d46ed476be92d2e243476d7a2f Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 14:27:19 +0100 Subject: [PATCH 6/8] bug fix for mac --- LibraryTree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/LibraryTree.py b/LibraryTree.py index bb6200ac..37f1084b 100644 --- a/LibraryTree.py +++ b/LibraryTree.py @@ -774,7 +774,10 @@ def InsertNewDomain(self, dName, parent, L = []): if D != []: self.InsertNewDomain(dName, parent, D) - self.SortChildren(parent) + try: + self.SortChildren(parent) + except: + pass return self.InsertNewDomain(dName, parent, L) From 1c293a2fbd925fc60ed9cc9ca09d313975945563 Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 14:30:49 +0100 Subject: [PATCH 7/8] bug fix for mac --- Components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Components.py b/Components.py index 2d303d24..3a2e5f05 100644 --- a/Components.py +++ b/Components.py @@ -178,7 +178,7 @@ def Load(filename, label): """ Load python file from filename """ filename = filename.strip() - assert(filename.endswith(('.py','.pyc'))),"File %s is not python file!"%filename + assert(filename.endswith(('.py','.pyc','.pyd'))),"File %s is not python file!"%filename return BlockFactory.CreateBlock(python_file = filename, label = label) From d822a47dfbcbd3e95a21a3c31e34718d02a22acc Mon Sep 17 00:00:00 2001 From: Capocchi L Date: Wed, 18 Dec 2019 14:37:13 +0100 Subject: [PATCH 8/8] bug fix for mac --- Components.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Components.py b/Components.py index 3a2e5f05..8d0b70e3 100644 --- a/Components.py +++ b/Components.py @@ -177,10 +177,17 @@ class PyComponent: def Load(filename, label): """ Load python file from filename """ - filename = filename.strip() - assert(filename.endswith(('.py','.pyc','.pyd'))),"File %s is not python file!"%filename + #fn = filename.strip() - return BlockFactory.CreateBlock(python_file = filename, label = label) + + fn = filename.replace(" ", "") + + assert(fn.endswith(('.py','.pyc','.pyd'))),"File %s is not python file!"%fn + + if os.path.exists(fn): + return BlockFactory.CreateBlock(python_file = fn, label = label) + else: + return None class GenericComponent: """