tools/generate_stubs/generate_stubs.py
def EnsureDirExists(dir):
  """Creates a directory. Does not use the more obvious 'if not exists: create'
  to avoid race with other invocations of the same code, which will error out
  on makedirs if another invocation has succeeded in creating the directory
  since the existence check."""
  try:
    os.makedirs(dir)
  except:
    if not os.path.isdir(dir):
      raise
Creates a directory. Does not use the more obvious 'if not exists: create'
  to avoid race with other invocations of the same code, which will error out
  on makedirs if another invocation has succeeded in creating the directory
  since the existence check.
Creates a directory. Does not use the more obvious 'if not exists: create'
to avoid race with other invocations of the same code, which will error out
on makedirs if another invocation has succeeded in creating the directory
since the existence check.
Creates a directory . Does not use the more obvious ' if not exists : create ' to avoid race with other invocations of the same code which will error out on makedirs if another invocation has succeeded in creating the directory since the existence check .
def EnsureDirExists(dir):
  try:
    os.makedirs(dir)
  except:
    if not os.path.isdir(dir):
      raise
def EnsureDirExists ( dir ) : try : os . makedirs ( dir ) except : if not os . path . isdir ( dir ) : raise
Creates a directory.
Creates a directory .
"""Creates a directory. Does not use the more obvious 'if not exists: create'
  to avoid race with other invocations of the same code, which will error out
  on makedirs if another invocation has succeeded in creating the directory
  since the existence check."""
dir