Browse Source

Improve handling of flags= argument

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46109 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 14 years ago
parent
commit
a1e5258fb8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/python/core.py

+ 2 - 0
lib/python/core.py

@@ -120,6 +120,8 @@ def make_command(prog, flags = "", overwrite = False, quiet = False, verbose = F
     if verbose:
 	args.append("--v")
     if flags:
+        if '-' in flags:
+            raise ScriptError("'-' is not a valid flag")
 	args.append("-%s" % flags)
     for opt, val in options.iteritems():
 	if val != None: