# ---------------------------------------------------------------------------- # Main # ---------------------------------------------------------------------------- if __name__ == '__main__': # Parse user input args = interface() # supply parameters that the validation script expects to have parsed args.error_file = False study_dir = args.study_directory # Validate the study directory. print >> sys.stderr, "Starting validation...\n" try: exitcode = validateData.main_validate(args) except KeyboardInterrupt: print >> sys.stderr, Color.BOLD + "\nProcess interrupted. " + Color.END print >> sys.stderr, "#" * 71 + "\n" raise except: print >> sys.stderr, "!" * 71 print >> sys.stderr, Color.RED + "Error occurred during validation step:" + Color.END raise finally: # make sure all log messages are flushed validator_logger = logging.getLogger(validateData.__name__) for log_handler in validator_logger.handlers: log_handler.close() validator_logger.handlers = []
# Main # ---------------------------------------------------------------------------- if __name__ == '__main__': # Parse user input args = interface() # supply parameters that the validation script expects to have parsed args.error_file = False args.no_portal_checks = False study_dir = args.study_directory # Validate the study directory. print >> sys.stderr, "Starting validation...\n" try: exitcode = validateData.main_validate(args) except KeyboardInterrupt: print >> sys.stderr, Color.BOLD + "\nProcess interrupted. " + Color.END print >> sys.stderr, "#" * 71 + "\n" raise except: print >> sys.stderr, "!" * 71 print >> sys.stderr, Color.RED + "Error occurred during validation step:" + Color.END raise finally: # make sure all log messages are flushed validator_logger = logging.getLogger(validateData.__name__) for log_handler in validator_logger.handlers: log_handler.close() validator_logger.handlers = []