def create_files_from_macho_zip(fileobj, project=None):
 scratchpad = tempfile.mkdtemp()
 try:
  safe_extract_zip(fileobj, scratchpad)
  to_create = []
  for (dirpath, dirnames, filenames) in os.walk(scratchpad):
   for fn in filenames:
    fn = os.path.join(dirpath, fn)
    try:
     uuids = get_macho_uuids(fn)
    except (IOError, ValueError):
     continue
    for (cpu, uuid) in uuids:
     to_create.append((cpu, uuid, fn))
  rv = []
  for (cpu, uuid, filename) in to_create:
   with open(filename, 'rb') as f:
    rv.append(_create_macho_dsym_from_uuid(project, cpu, uuid, f, os.path.basename(filename)))
  return rv
 finally:
  shutil.rmtree(scratchpad)

def create_files_from_macho_zip ( fileobj , project = None ) : scratchpad = tempfile . mkdtemp ( ) try : safe_extract_zip ( fileobj , scratchpad ) to_create = [ ] for ( dirpath , dirnames , filenames ) in os . walk ( scratchpad ) : for fn in filenames : fn = os . path . join ( dirpath , fn ) try : uuids = get_macho_uuids ( fn ) except ( IOError , ValueError ) : continue for ( cpu , uuid ) in uuids : to_create . append ( ( cpu , uuid , fn ) ) rv = [ ] for ( cpu , uuid , filename ) in to_create : with open ( filename , 'rb' ) as f : rv . append ( _create_macho_dsym_from_uuid ( project , cpu , uuid , f , os . path . basename ( filename ) ) ) return rv finally : shutil . rmtree ( scratchpad )
creates all missing dsym files from the given zip file .