sys.exit(1) if options.password is None: options.password = PublishTask.getPassword(options.username) if options.password is None: print "Authentication Failed, exiting\n\n" sys.exit(1) # For multiple file input if options.multi: file = open(args[0], 'r') lines = file.readlines() for line in lines: sampleName, fileowner, comment = separateOutput(line) if fileowner is not None: options.fileown = fileowner if comment is not None: options.commented = comment pub = PublishTask(sampleName,options.fileown,copy.deepcopy(options) ) pub.password = options.password pub.run({}) # For singular file input else: sampleName = args[0].rstrip("/") pub = PublishTask(sampleName,options.fileown, copy.deepcopy(options) ) pub.password = options.password pub.run({})
parser.print_help() sys.exit(1) if options.password is None: options.password = PublishTask.getPassword(options.username) if options.password is None: print "Authentication Failed, exiting\n\n" sys.exit(1) # For multiple file input if options.multi: file = open(args[0], 'r') lines = file.readlines() for line in lines: sampleName, fileowner, comment = separateOutput(line) if fileowner is not None: options.fileown = fileowner if comment is not None: options.commented = comment pub = PublishTask(sampleName, options.fileown, copy.deepcopy(options)) pub.password = options.password pub.run({}) # For singular file input else: sampleName = args[0].rstrip("/") pub = PublishTask(sampleName, options.fileown, copy.deepcopy(options)) pub.password = options.password pub.run({})