No main attribute error

No main attribute error

  

Hi,

I am getting this error when calling main function. What could I be missing:

AttributeError: module 'createQueues' has no attribute 'main'


import csv

def createQueues():
    sibCluster = busMemberClust
    scope = appSrvClust  
    csvfile = open('SecureReplayQueues.csv')
    readCSV = csv.reader(csvfile, delimiter=',')
    for row in readCSV:
        queue = row[0]
        jndiname = row[1]
        busName = row[2]
        sibDestination = row[3]
        while row >= "1":
            try:

               print "creating queues: " + queue
               # Create destination
               args = '-bus', busName, '-name', sibDestination, '-type', 'QUEUE', '-cluster', sibCluster
               print args
               AdminTask.createSIBDestination(args)
       

               # Create queue
               args = '-name', queue, '-jndiName', jndiname, '-queueName', sibDestination, '-busName', busName
               print args
               AdminTask.createSIBJMSQueue(scope,args)
#           AdminConfig.Save()

            finally:
               print "Exiting"

    AdminConfig.Save()

def main():
    print "------------"
    print "createQueues"
    print "------------"
    createQueues()


if __name__ == "__main__":
    main()

Solution

Hi Val,

Can you tell me what you're trying to do? Is this somehow related with the OutSystems Platform?

Solution