diff options
author | Luke Macken <lmacken@redhat.com> | 2011-03-12 12:22:07 -0500 |
---|---|---|
committer | Luke Macken <lmacken@redhat.com> | 2011-03-12 12:22:07 -0500 |
commit | f4281bdd8d77feb072151d387e5fbc39dda177f1 (patch) | |
tree | 7979521da09ba93835c653ba6c626ae6f6732a33 /photobooth.py | |
parent | 9e23bf79f46b6ee221ad0f58cc3165674e09e3f0 (diff) | |
download | photobooth-f4281bdd8d77feb072151d387e5fbc39dda177f1.tar.gz photobooth-f4281bdd8d77feb072151d387e5fbc39dda177f1.tar.xz photobooth-f4281bdd8d77feb072151d387e5fbc39dda177f1.zip |
Use subprocess
Diffstat (limited to 'photobooth.py')
-rw-r--r-- | photobooth.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/photobooth.py b/photobooth.py index 5162283..37d3d2f 100644 --- a/photobooth.py +++ b/photobooth.py @@ -87,7 +87,7 @@ class PhotoBooth(object): def upload(self, image): """ Upload this image to a remote server """ - os.system('scp "%s" %s' % (image, ssh_image_repo)) + subprocess.call('scp "%s" %s' % (image, ssh_image_repo), shell=True) if delete_after_upload: os.unlink(image) return http_image_repo + basename(image) @@ -95,7 +95,8 @@ class PhotoBooth(object): def qrencode(self, url): """ Generate a QRCode for a given URL """ qrcode = join(out, 'qrcode.png') - os.system('qrencode -s %d -o "%s" %s' % (qrcode_size, qrcode, url)) + subprocess.call('qrencode -s %d -o "%s" %s' % ( + qrcode_size, qrcode, url), shell=True) return qrcode def tinyurl(self, url): |