def _makeBuildbotTac(basedir, tac_file_contents, quiet):
 tacfile = os.path.join(basedir, 'buildbot.tac')
 if os.path.exists(tacfile):
  try:
   oldcontents = open(tacfile, 'rt').read()
  except IOError as exception:
   raise CreateWorkerError(('error reading %s: %s' % (tacfile, exception.strerror)))
  if (oldcontents == tac_file_contents):
   if (not quiet):
    print('buildbot.tac already exists and is correct')
   return
  if (not quiet):
   print('not touching existing buildbot.tac')
   print('creating buildbot.tac.new instead')
  tacfile = os.path.join(basedir, 'buildbot.tac.new')
 try:
  f = open(tacfile, 'wt')
  f.write(tac_file_contents)
  f.close()
  os.chmod(tacfile, 384)
 except IOError as exception:
  raise CreateWorkerError(('could not write %s: %s' % (tacfile, exception.strerror)))

def _makeBuildbotTac ( basedir , tac_file_contents , quiet ) : tacfile = os . path . join ( basedir , 'buildbot.tac' ) if os . path . exists ( tacfile ) : try : oldcontents = open ( tacfile , 'rt' ) . read ( ) except IOError as exception : raise CreateWorkerError ( ( 'error reading %s: %s' % ( tacfile , exception . strerror ) ) ) if ( oldcontents == tac_file_contents ) : if ( not quiet ) : print ( 'buildbot.tac already exists and is correct' ) return if ( not quiet ) : print ( 'not touching existing buildbot.tac' ) print ( 'creating buildbot.tac.new instead' ) tacfile = os . path . join ( basedir , 'buildbot.tac.new' ) try : f = open ( tacfile , 'wt' ) f . write ( tac_file_contents ) f . close ( ) os . chmod ( tacfile , 384 ) except IOError as exception : raise CreateWorkerError ( ( 'could not write %s: %s' % ( tacfile , exception . strerror ) ) )
create buildbot .