From 14cbfe29d6900a9164d850dc247e6c1c1fd9f20f Mon Sep 17 00:00:00 2001 From: Bouke Haarsma Date: Tue, 8 Apr 2014 15:58:34 +0200 Subject: [PATCH] Fixed issue where arguments were not parsed correctly --- jsonschema/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsonschema/cli.py b/jsonschema/cli.py index e466d55..69ac5af 100644 --- a/jsonschema/cli.py +++ b/jsonschema/cli.py @@ -9,7 +9,7 @@ from . import ( from .validators import validator_for -def main(args): +def main(args=sys.argv[1:]): parser = argparse.ArgumentParser(description='JSON Schema validator') parser.add_argument('schema', help='filename of the JSON Schema') parser.add_argument('document', help='filename of the JSON document to validate') @@ -37,4 +37,4 @@ def main(args): print("JSON document is valid.") if __name__ == '__main__': - main(sys.argv) + main()