def _makeBaseDir(basedir, quiet):
 if os.path.exists(basedir):
  if (not quiet):
   print('updating existing installation')
  return
 if (not quiet):
  print('mkdir', basedir)
 try:
  os.mkdir(basedir)
 except OSError as exception:
  raise CreateWorkerError(('error creating directory %s: %s' % (basedir, exception.strerror)))

def _makeBaseDir ( basedir , quiet ) : if os . path . exists ( basedir ) : if ( not quiet ) : print ( 'updating existing installation' ) return if ( not quiet ) : print ( 'mkdir' , basedir ) try : os . mkdir ( basedir ) except OSError as exception : raise CreateWorkerError ( ( 'error creating directory %s: %s' % ( basedir , exception . strerror ) ) )
make worker base directory if needed .