From 223e1dfebea7aefd59cdd1b76e4368a1f2ba5e46 Mon Sep 17 00:00:00 2001 From: dalthviz Date: Thu, 2 Feb 2017 18:28:26 -0500 Subject: [PATCH 1/2] Adds a validation for the editorstack existence. --- spyder/plugins/editor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spyder/plugins/editor.py b/spyder/plugins/editor.py index efbca0d6a5d..10ea022e260 100644 --- a/spyder/plugins/editor.py +++ b/spyder/plugins/editor.py @@ -1475,9 +1475,10 @@ def refresh_file_dependent_actions(self): def refresh_save_all_action(self): """Enable 'Save All' if there are files to be saved""" editorstack = self.get_current_editorstack() - state = any(finfo.editor.document().isModified() - for finfo in editorstack.data) - self.save_all_action.setEnabled(state) + if editorstack: + state = any(finfo.editor.document().isModified() + for finfo in editorstack.data) + self.save_all_action.setEnabled(state) def update_warning_menu(self): """Update warning list menu""" From a501591cd0da796b5add822b88d1b030884c8423 Mon Sep 17 00:00:00 2001 From: Carlos Cordoba Date: Sat, 4 Feb 2017 16:29:11 -0500 Subject: [PATCH 2/2] Testing: Make Travis select the right branch when running tests not on a PR --- continuous_integration/travis/build_test.sh | 2 +- continuous_integration/travis/modules_test.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/continuous_integration/travis/build_test.sh b/continuous_integration/travis/build_test.sh index 4144c1ac8d6..d69ccb81432 100755 --- a/continuous_integration/travis/build_test.sh +++ b/continuous_integration/travis/build_test.sh @@ -9,7 +9,7 @@ cd $FULL_SPYDER_CLONE if [ $TRAVIS_PULL_REQUEST != "false" ] ; then git checkout travis_pr_$TRAVIS_PULL_REQUEST else - git checkout master + git checkout $TRAVIS_BRANCH fi # -- Build package diff --git a/continuous_integration/travis/modules_test.sh b/continuous_integration/travis/modules_test.sh index 1098aa7146f..3ae779da700 100755 --- a/continuous_integration/travis/modules_test.sh +++ b/continuous_integration/travis/modules_test.sh @@ -11,7 +11,7 @@ cd $FULL_SPYDER_CLONE if [ $TRAVIS_PULL_REQUEST != "false" ] ; then git checkout travis_pr_$TRAVIS_PULL_REQUEST else - git checkout master + git checkout $TRAVIS_BRANCH fi # Depth 1