Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OggEncoder: specify list args for subprocess.call #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions flacsync/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,7 @@ def encode( self, force=False ):
if force or util.newer( self.src, self.dst):
self._pre_encode()
# encode to OGG
err = sp.call( 'oggenc -q %s -o "%s" "%s"' %
(self.q, self.dst, self.src), shell=True, stderr=NULL)
err = sp.call(['oggenc', '-q', self.q, '-o', self.dst, self.src], stderr=NULL)
if err == -2: # keyboard interrupt
os.remove(self.dst) # clean-up partial file
raise KeyboardInterrupt
Expand Down Expand Up @@ -331,8 +330,7 @@ def set_cover( self, force=False, resize=False ):
len(bin_cover),
bin_cover)
meta_block = base64.b64encode(meta_block)
err = sp.call( 'vorbiscomment -a -t "META_BLOCK_PICTURE=%s" "%s"' %
(meta_block, self.dst), shell=True, stderr=NULL)
err = sp.call(['vorbiscomment', '-a', '-t', "META_BLOCK_PICTURE=%s" % meta_block, self.dst], stderr=NULL)
return self._check_err( err, "OGG add-cover failed:" )


Expand Down