[pitivi] Use subprocess.call() instead of os.system() when opening an image



commit 45a4c84edb3b4343f199bba1c65502e3f49f5bb2
Author: Luke Faraone <lfaraone debian org>
Date:   Sun Sep 13 17:29:17 2015 +0000

    Use subprocess.call() instead of os.system() when opening an image

 pitivi/mainwindow.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 30847f5..c5f3db0 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -21,6 +21,7 @@
 # Boston, MA 02110-1301, USA.
 
 import os
+import subprocess
 
 from time import time
 from urllib.parse import unquote
@@ -546,7 +547,7 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
         # to do a better job (sizing, zooming, metadata, editing, etc.)
         # than the user's favorite image viewer.
         if asset.is_image():
-            os.system('xdg-open "%s"' % path_from_uri(asset.get_id()))
+            subprocess.call(['xdg-open', str(path_from_uri(asset.get_id()))])
         else:
             preview_window = PreviewAssetWindow(asset, self)
             preview_window.preview()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]