aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2023-09-27 21:43:20 +0200
committerGuilhem Moulin <guilhem@fripost.org>2023-09-27 22:14:23 +0200
commit095dfbc76675149cf89014b8b8c4690e0a012108 (patch)
tree6d9b0fa63da627fa720981647488470385737c7a
parent82d87323ad2a3ba06a7f69374433a43ae4d22bfb (diff)
Fix parser.error() calls.
-rwxr-xr-xgis-observation-map6
1 files changed, 4 insertions, 2 deletions
diff --git a/gis-observation-map b/gis-observation-map
index ac9baa7..1036009 100755
--- a/gis-observation-map
+++ b/gis-observation-map
@@ -103,10 +103,12 @@ if args.project_home is not None and args.project_name is not None:
raise Exception('Invalid CRS')
elif args.project_home is None or args.project_name is None:
- parser.error()
+ parser.print_usage()
+ exit(1)
if len(args.geometry) == 0 and len(args.point) == 0:
- parser.error()
+ parser.print_usage()
+ exit(1)
if len(args.point) > 0 and (args.margin is None or args.margin <= 0):
parser.error("--point requires positive --margin")