<s> import argparse <EOL> import logging <EOL> import sys <EOL> import yaml <EOL> def parse_args ( ) : <EOL> p = argparse . ArgumentParser ( ) <EOL> p . add_argument ( '<STR_LIT:input>' , nargs = '<STR_LIT:*>' ) <EOL> return p . parse_args ( ) <EOL> def main ( ) : <EOL> args = parse_args ( ) <EOL> logging . basicConfig ( ) <EOL> res = <NUM_LIT:0> <EOL> for filename in args . input : <EOL> with open ( filename ) as fd : <EOL> try : <EOL> yaml . load ( fd ) <EOL> except yaml . error . YAMLError as error : <EOL> res = <NUM_LIT:1> <EOL> logging . error ( '<STR_LIT>' , <EOL> filename , error ) <EOL> sys . exit ( res ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
