Only copy the environment to the mplayer executable if it's set, and don't copy the whole environment from platypush
This commit is contained in:
parent
c18650c964
commit
9ebb265458
1 changed files with 8 additions and 6 deletions
|
@ -112,13 +112,15 @@ class MediaMplayerPlugin(MediaPlugin):
|
||||||
if arg not in args:
|
if arg not in args:
|
||||||
args.append(arg)
|
args.append(arg)
|
||||||
|
|
||||||
env = os.environ.copy()
|
popen_args = {
|
||||||
if self._env:
|
'stdin': subprocess.PIPE,
|
||||||
env.update(self._env)
|
'stdout': subprocess.PIPE,
|
||||||
|
}
|
||||||
|
|
||||||
self._mplayer = subprocess.Popen(args, env=env,
|
if self._env:
|
||||||
stdin=subprocess.PIPE,
|
popen_args['env'] = self._env
|
||||||
stdout=subprocess.PIPE)
|
|
||||||
|
self._mplayer = subprocess.Popen(args, **popen_args)
|
||||||
|
|
||||||
def _build_actions(self):
|
def _build_actions(self):
|
||||||
""" Populates the actions list by introspecting the mplayer executable """
|
""" Populates the actions list by introspecting the mplayer executable """
|
||||||
|
|
Loading…
Reference in a new issue