replace many Popen calls with more modern subprocess.call
This commit is contained in:
parent
ece93ac054
commit
8de8a0be33
4 changed files with 13 additions and 22 deletions
|
@ -1,4 +1,4 @@
|
|||
from subprocess import Popen
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
@ -9,8 +9,7 @@ if os.geteuid() != 0:
|
|||
try:
|
||||
print "Waiting for media-monitor processes to stop...",
|
||||
if (os.path.exists('/etc/init.d/airtime-media-monitor')):
|
||||
p = Popen("invoke-rc.d airtime-media-monitor stop", shell=True)
|
||||
sts = os.waitpid(p.pid, 0)[1]
|
||||
subprocess.call("invoke-rc.d airtime-media-monitor stop", shell=True)
|
||||
print "OK"
|
||||
else:
|
||||
print "Wasn't running"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue