mirror of
https://github.com/munki/munki.git
synced 2026-04-21 20:18:20 -05:00
Changed unmountdmg back to using subprocess.Popen from an earlier change to subprocess.call so that we can capture the output instead of it going to stdout.
git-svn-id: http://munki.googlecode.com/svn/trunk@652 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -433,8 +433,11 @@ def unmountdmg(mountpoint):
|
||||
"""
|
||||
Unmounts the dmg at mountpoint
|
||||
"""
|
||||
retcode = subprocess.call(['/usr/bin/hdiutil', 'detach', mountpoint])
|
||||
if retcode:
|
||||
proc = subprocess.Popen(['/usr/bin/hdiutil', 'detach', mountpoint],
|
||||
bufsize=1, stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
(ouptut, err) = proc.communicate()
|
||||
if proc.returncode:
|
||||
display_warning("Attempting to force unmount %s" % mountpoint)
|
||||
# try forcing the unmount
|
||||
retcode = subprocess.call(['/usr/bin/hdiutil', 'detach', mountpoint,
|
||||
|
||||
Reference in New Issue
Block a user