diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-06-19 19:57:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-06-19 20:00:46 +0400 |
commit | 2dce13d213f6c02b97a62bb1d7a8661998e22a53 (patch) | |
tree | fcefb9bedaba95b33ac53780de7b0501342c71d6 /release/scripts | |
parent | eaac6cbcd9428533273091710759106131f92340 (diff) |
Python: Remove deprecated uses of os.popen
T40415 by Lawrence D'Oliveiro
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 86ae8fdc4e6..4281c908afd 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -802,13 +802,14 @@ class WM_OT_path_open(Operator): if sys.platform[:3] == "win": os.startfile(filepath) elif sys.platform == "darwin": - subprocess.Popen(["open", filepath]) + subprocess.check_call(["open", filepath]) else: try: - subprocess.Popen(["xdg-open", filepath]) - except OSError: + subprocess.check_call(["xdg-open", filepath]) + except: # xdg-open *should* be supported by recent Gnome, KDE, Xfce - pass + import traceback + traceback.print_exc() return {'FINISHED'} |