From 3e134686952d261bf57b5a3a2a7532a95912c4bf Mon Sep 17 00:00:00 2001 From: fuzzgun Date: Mon, 15 Jul 2013 17:58:22 +0100 Subject: [PATCH] Use subprocess.call --- src/bitmessageqt/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 69ef2597..b2cb2640 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -29,6 +29,7 @@ import os from pyelliptic.openssl import OpenSSL import pickle import platform +import subprocess try: from PyQt4 import QtCore, QtGui @@ -936,9 +937,9 @@ class MyForm(QtGui.QMainWindow): if 'linux' in sys.platform: # Note: QSound was a nice idea but it didn't work if '.mp3' in soundFilename: - os.popen('gst123 ' + soundFilename) + subprocess.call(["gst123", soundFilename]) else: - os.popen('aplay ' + soundFilename) + subprocess.call(["aplay", soundFilename]) elif sys.platform[0:3] == 'win': # use winsound on Windows import winsound