third_party/android_platform/development/scripts/stack.py
def UnzipSymbols(symbolfile, symdir=None):
  """Unzips a file to DEFAULT_SYMROOT and returns the unzipped location.

  Args:
    symbolfile: The .zip file to unzip
    symdir: Optional temporary directory to use for extraction

  Returns:
    A tuple containing (the directory into which the zip file was unzipped,
    the path to the "symbols" directory in the unzipped file).  To clean
    up, the caller can delete the first element of the tuple.

  Raises:
    SymbolDownloadException: When the unzip fails.
  """
  if not symdir:
    symdir = "%s/%s" % (DEFAULT_SYMROOT, hash(symbolfile))
  if not os.path.exists(symdir):
    os.makedirs(symdir)

  logging.info('extracting %s...', symbolfile)
  saveddir = os.getcwd()
  os.chdir(symdir)
  try:
    unzipcode = subprocess.call(["unzip", "-qq", "-o", symbolfile])
    if unzipcode > 0:
      os.remove(symbolfile)
      raise SymbolDownloadException("failed to extract symbol files (%s)."
                                    % symbolfile)
  finally:
    os.chdir(saveddir)

  android_symbols = glob.glob("%s/out/target/product/*/symbols" % symdir)
  if android_symbols:
    return (symdir, android_symbols[0])

  # This is a zip of Chrome symbols, so symbol.CHROME_SYMBOLS_DIR needs to be
  # updated to point here.
  symbol.CHROME_SYMBOLS_DIR = symdir
  return (symdir, symdir)
Unzips a file to DEFAULT_SYMROOT and returns the unzipped location.

  Args:
    symbolfile: The .zip file to unzip
    symdir: Optional temporary directory to use for extraction

  Returns:
    A tuple containing (the directory into which the zip file was unzipped,
    the path to the "symbols" directory in the unzipped file).  To clean
    up, the caller can delete the first element of the tuple.

  Raises:
    SymbolDownloadException: When the unzip fails.
  
Unzips a file to DEFAULT_SYMROOT and returns the unzipped location.
Unzips a file to DEFAULT_SYMROOT and returns the unzipped location .
def UnzipSymbols(symbolfile, symdir=None):
  if not symdir:
    symdir = "%s/%s" % (DEFAULT_SYMROOT, hash(symbolfile))
  if not os.path.exists(symdir):
    os.makedirs(symdir)
  logging.info('extracting %s...', symbolfile)
  saveddir = os.getcwd()
  os.chdir(symdir)
  try:
    unzipcode = subprocess.call(["unzip", "-qq", "-o", symbolfile])
    if unzipcode > 0:
      os.remove(symbolfile)
      raise SymbolDownloadException("failed to extract symbol files (%s)."
                                    % symbolfile)
  finally:
    os.chdir(saveddir)
  android_symbols = glob.glob("%s/out/target/product/*/symbols" % symdir)
  if android_symbols:
    return (symdir, android_symbols[0])
  symbol.CHROME_SYMBOLS_DIR = symdir
  return (symdir, symdir)
def UnzipSymbols ( symbolfile , symdir = None ) : if not symdir : symdir = "%s/%s" % ( DEFAULT_SYMROOT , hash ( symbolfile ) ) if not os . path . exists ( symdir ) : os . makedirs ( symdir ) logging . info ( 'extracting %s...' , symbolfile ) saveddir = os . getcwd ( ) os . chdir ( symdir ) try : unzipcode = subprocess . call ( [ "unzip" , "-qq" , "-o" , symbolfile ] ) if unzipcode > 0 : os . remove ( symbolfile ) raise SymbolDownloadException ( "failed to extract symbol files (%s)." % symbolfile ) finally : os . chdir ( saveddir ) android_symbols = glob . glob ( "%s/out/target/product/*/symbols" % symdir ) if android_symbols : return ( symdir , android_symbols [ 0 ] ) symbol . CHROME_SYMBOLS_DIR = symdir return ( symdir , symdir )
Unzips a file to DEFAULT_SYMROOT and returns the unzipped location.
Unzips a file to DEFAULT_SYMROOT and returns the unzipped location .
"""Unzips a file to DEFAULT_SYMROOT and returns the unzipped location.

  Args:
    symbolfile: The .zip file to unzip
    symdir: Optional temporary directory to use for extraction

  Returns:
    A tuple containing (the directory into which the zip file was unzipped,
    the path to the "symbols" directory in the unzipped file).  To clean
    up, the caller can delete the first element of the tuple.

  Raises:
    SymbolDownloadException: When the unzip fails.
  """ # This is a zip of Chrome symbols, so symbol.CHROME_SYMBOLS_DIR needs to be # updated to point here.
A tuple containing (the directory into which the zip file was unzipped,
the path to the "symbols" directory in the unzipped file).  To clean
up, the caller can delete the first element of the tuple.
A tuple containing ( the directory into which the zip file was unzipped the path to the " symbols " directory in the unzipped file ) . To clean up the caller can delete the first element of the tuple .
When the unzip fails.
When the unzip fails .
SymbolDownloadException
symbolfile
The .zip file to unzip
The . zip file to unzip
symdir
Optional temporary directory to use for extraction
Optional temporary directory to use for extraction