diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-06-03 10:02:36 +0200 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-06-09 14:47:35 +0200 |
commit | 94c4606edd30dc8b1278580782f2809b69f04641 (patch) | |
tree | 6b7aa37b42f406c13d44b861aaf49ff54e9bb89b /grc/gui/ActionHandler.py | |
parent | 438dbd8839ad4c9079c5b8c2573bd9009b2b2e51 (diff) |
grc: py3k compat using python-modernize
Diffstat (limited to 'grc/gui/ActionHandler.py')
-rw-r--r-- | grc/gui/ActionHandler.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/grc/gui/ActionHandler.py b/grc/gui/ActionHandler.py index 492bf8de9c..9c3e9246d5 100644 --- a/grc/gui/ActionHandler.py +++ b/grc/gui/ActionHandler.py @@ -18,6 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ +from __future__ import absolute_import, print_function + import os import subprocess @@ -114,7 +116,7 @@ class ActionHandler: ################################################## if action == Actions.APPLICATION_INITIALIZE: if not self.init_file_paths: - self.init_file_paths = filter(os.path.exists, Preferences.get_open_files()) + self.init_file_paths = list(filter(os.path.exists, Preferences.get_open_files())) if not self.init_file_paths: self.init_file_paths = [''] for file_path in self.init_file_paths: if file_path: main.new_page(file_path) #load pages from file paths @@ -603,7 +605,7 @@ class ActionHandler: try: page.process.kill() except: - print "could not kill process: %d" % page.process.pid + print("could not kill process: %d" % page.process.pid) elif action == Actions.PAGE_CHANGE: # pass and run the global actions pass elif action == Actions.RELOAD_BLOCKS: @@ -645,7 +647,7 @@ class ActionHandler: shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) else: - print '!!! Action "%s" not handled !!!' % action + print('!!! Action "%s" not handled !!!' % action) ################################################## # Global Actions for all States ################################################## |