mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-05 11:03:12 +00:00
15 lines
349 B
Python
15 lines
349 B
Python
|
import subprocess
|
||
|
|
||
|
|
||
|
def output_yielder(command):
|
||
|
with subprocess.Popen(
|
||
|
command,
|
||
|
shell=False,
|
||
|
stdout=subprocess.PIPE,
|
||
|
stderr=subprocess.STDOUT,
|
||
|
universal_newlines=True,
|
||
|
) as handle:
|
||
|
for line in iter(handle.stdout.readline, ""):
|
||
|
if "NOTICE:" not in line:
|
||
|
yield line
|