From f4281bdd8d77feb072151d387e5fbc39dda177f1 Mon Sep 17 00:00:00 2001 From: Luke Macken Date: Sat, 12 Mar 2011 12:22:07 -0500 Subject: Use subprocess --- photobooth.py | 5 +++-- 1 file 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): -- cgit