(self)
Creates the sparsebundle to install OS X into.
Creates the sparsebundle to install OS X into.
Creates the sparsebundle to install OS X into .
def CreateSparseBundle(self):
    """Creates the sparsebundle to install OS X into."""
    sparsebundle_path = os.path.join(self.cwd, BUILD, 'new.sparsebundle')
    if os.path.exists(sparsebundle_path):
      shutil.rmtree(sparsebundle_path)
    cmd = ['hdiutil', 'create', sparsebundle_path, '-size', '20G', '-volname',
           'MacintoshHD', '-layout', 'GPTSPUD', '-fs', 'JHFS+', '-mode',
           '775', '-uid', '0', '-gid', '80']
    (unused_stdout, stderr, unused_rc) = RunProcess(cmd)
    if stderr:
      print 'Failed to create sparsebundle at %s: %s' % (sparsebundle_path,
                                                         stderr)
      raise SystemExit
    else:
      return sparsebundle_path
def CreateSparseBundle ( self ) : sparsebundle_path = os . path . join ( self . cwd , BUILD , 'new.sparsebundle' ) if os . path . exists ( sparsebundle_path ) : shutil . rmtree ( sparsebundle_path ) cmd = [ 'hdiutil' , 'create' , sparsebundle_path , '-size' , '20G' , '-volname' , 'MacintoshHD' , '-layout' , 'GPTSPUD' , '-fs' , 'JHFS+' , '-mode' , '775' , '-uid' , '0' , '-gid' , '80' ] ( unused_stdout , stderr , unused_rc ) = RunProcess ( cmd ) if stderr : print 'Failed to create sparsebundle at %s: %s' % ( sparsebundle_path , stderr ) raise SystemExit else : return sparsebundle_path