Changeset 608 for branches


Ignore:
Timestamp:
Oct 15, 2007 12:08:44 AM (12 years ago)
Author:
kmartin
Message:

start to add code to get user depedent information from a config file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/testScripts/nightlyBuild.py

    r607 r608  
    369369
    370370sys.exit(0)
     371
     372
     373# START KIPP
     374#----------------------------------------------------------------------
     375# CONFIG FILE PATH:
     376#   path to the config file for the build
     377#   done. If the directory does not exist, it will be created.
     378#   this should have all of the user specific data
     379#   it should have values for
     380#   NIGHTLY_BUILD_ROOT
     381#   SMTP_SERVER_NAME
     382#   SMTP_SERVER_PORT
     383#   SMTP_SSL_SERVER
     384#   SMTP_USER_NAME
     385#   SMTP_PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile'
     386#   SENDER_EMAIL_ADDR='jpfasano _AT_ verizon _DOT_ net'
     387#   MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com'
     388#   
     389#----------------------------------------------------------------------
     390
     391CONFIG_FILE_PATH = '/Users/kmartin/Documents/files/configDir/'
     392CONFIG_FILENAME = 'config.txt'
     393
     394
     395# Get configFile data
     396
     397configFile = os.path.join(os.path.dirname( CONFIG_FILE_PATH),
     398                                 os.path.basename(CONFIG_FILENAME ))
     399if os.path.isfile(  configFile) :
     400  pwFilePtr = open(configFile ,'r')
     401  d = pwFilePtr.readlines()
     402  # do pwFilePtr.read() to get a string object
     403  # we have a list object
     404  print d[0]
     405  print d[1]
     406  # make a dictionary
     407  config_dic = {}
     408
     409  #smtppass  = pwFilePtr.read().strip()
     410  pwFilePtr.close()
     411else :
     412  #writeLogMessage( "Failure reading pwFileName=" + CONFIG_FILENAME )
     413  #print cmdMsgs
     414  sys.exit( 1)
     415sys.exit( 0)
     416
     417# END KIPP
     418
     419# START KIPP
     420#----------------------------------------------------------------------
     421# CONFIG FILE PATH:
     422#   path to the config file for the build
     423#   done. If the directory does not exist, it will be created.
     424#   this should have all of the user specific data
     425#   it should have values for
     426#   NIGHTLY_BUILD_ROOT
     427#   SMTP_SERVER_NAME
     428#   SMTP_SERVER_PORT
     429#   SMTP_SSL_SERVER
     430#   SMTP_USER_NAME
     431#   SMTP_PASSWORD_FILENAME = '/home/jp/bin/smtpPwFile'
     432#   SENDER_EMAIL_ADDR='jpfasano _AT_ verizon _DOT_ net'
     433#   MY_EMAIL_ADDR='jpfasano _AT_ us _DOT_ ibm _DOT_ com'
     434#   
     435#----------------------------------------------------------------------
     436
     437CONFIG_FILE_PATH = '/Users/kmartin/Documents/files/configDir/'
     438CONFIG_FILENAME = 'config.txt'
     439
     440
     441# Get configFile data
     442
     443configFile = os.path.join(os.path.dirname( CONFIG_FILE_PATH),
     444                                 os.path.basename(CONFIG_FILENAME ))
     445if os.path.isfile(  configFile) :
     446  pwFilePtr = open(configFile ,'r')
     447  d = pwFilePtr.readlines()
     448  # do pwFilePtr.read() to get a string object
     449  # we have a list object
     450  print d[0]
     451  print d[1]
     452  # make a dictionary
     453  config_dic = {}
     454
     455  #smtppass  = pwFilePtr.read().strip()
     456  pwFilePtr.close()
     457else :
     458  #writeLogMessage( "Failure reading pwFileName=" + CONFIG_FILENAME )
     459  #print cmdMsgs
     460  sys.exit( 1)
     461sys.exit( 0)
     462
     463# END KIPP
Note: See TracChangeset for help on using the changeset viewer.