diff options
-rwxr-xr-x | mowgli.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -128,7 +128,10 @@ def download(url): def install(pkg): - subprocess.call(['/usr/sbin/installer', '-pkg', pkg, '-target', '/']) + r = subprocess.call(['/usr/sbin/installer', '-pkg', pkg, '-target', '/']) + if r > 0: + raise Exception('Failed to install package %s' % pkg) + os.remove(pkg) |