From: Gilles DAVID Date: Tue, 30 May 2017 11:21:00 +0000 (+0200) Subject: Fix argparse error X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b2ae55fbe1a88140c0067a79a32e4073f89ea6d9;p=modules%2Fadao.git Fix argparse error --- diff --git a/bin/AdaoCatalogGenerator.py b/bin/AdaoCatalogGenerator.py index 2f5993d..50135d1 100644 --- a/bin/AdaoCatalogGenerator.py +++ b/bin/AdaoCatalogGenerator.py @@ -33,8 +33,7 @@ import module_version logging.basicConfig(level=logging.WARNING) #----------- Templates Part ---------------# -begin_catalog_file = """#-*-coding:iso-8859-1-*- -# +begin_catalog_file = """# # Copyright (C) 2008-2017 EDF R&D # # This file is part of SALOME ADAO module @@ -325,7 +324,8 @@ except: from argparse import ArgumentParser usage = "usage: %(prog)s [options] catalog_path catalog_name" version="%(prog)s 0.1" -my_parser = ArgumentParser(usage=usage, version=version) +my_parser = ArgumentParser(usage=usage) +my_parser.add_argument('-v', '--version', action='version', version=version) my_parser.add_argument('catalog_path') my_parser.add_argument('catalog_name') args = my_parser.parse_args()