diff options
author | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2019-07-11 17:35:05 -0400 |
---|---|---|
committer | Konstantin Ryabitsev <konstantin@linuxfoundation.org> | 2019-07-11 17:35:05 -0400 |
commit | c07f82506074ea603c31646f3f35401b27ab01da (patch) | |
tree | 8e185da9c3bbfc7e75ea9fe8a1b4056d6ad86b7e | |
parent | dfccf80ad6b45075534bef21b396bf0f9bada13c (diff) | |
download | ksmap-c07f82506074ea603c31646f3f35401b27ab01da.tar.gz |
Don't require parameters containing defaults
Providing required=true with defaults is ignoring those defaults.
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
-rwxr-xr-x | yaml-to-kml.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaml-to-kml.py b/yaml-to-kml.py index a0c3d2a..0ee3063 100755 --- a/yaml-to-kml.py +++ b/yaml-to-kml.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python import os import sys @@ -15,13 +15,13 @@ if __name__ == '__main__': parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelpFormatter ) - parser.add_argument('-f', dest='filepattern', action='store', required=True, + parser.add_argument('-f', dest='filepattern', action='store', default='users/*.yaml', help='Pattern of YAML files to process') parser.add_argument('-r', dest='privround', action='store_true', default=False, help='Round coordinates to two decimal points for privacy') - parser.add_argument('-o', dest='outfile', action='store', required=True, + parser.add_argument('-o', dest='outfile', action='store', default='www/developers.kml', help='Where to output the resulting KML file') parser.add_argument('-d', dest='dryrun', action='store_true', |