From ad9d7caafd5223b8e352100e7c142b746af482c1 Mon Sep 17 00:00:00 2001 From: Oliverpool Date: Tue, 8 Mar 2016 06:59:37 +0100 Subject: [PATCH] patatools Python3.5 compat See 932e39e6a891cae2e110457261def793edca78eb --- patacrep/tools/__main__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/patacrep/tools/__main__.py b/patacrep/tools/__main__.py index 669dcec7..13794b14 100644 --- a/patacrep/tools/__main__.py +++ b/patacrep/tools/__main__.py @@ -104,11 +104,13 @@ def commandline_parser(): return parser -def main(args): +def main(args=None): """Main function""" + if args is None: + args = sys.argv parser = commandline_parser() args = parser.parse_args(args[1:]) args.function(["patatools-{}".format(args.subcommand)] + args.remainder) if __name__ == "__main__": - main(sys.argv) + main()