]> git.lyx.org Git - lyx.git/commitdiff
* prefs2prefs.py : Error when both -l and -p are given, update usage.
authorJulien Rioux <jrioux@lyx.org>
Mon, 12 Sep 2011 20:42:53 +0000 (20:42 +0000)
committerJulien Rioux <jrioux@lyx.org>
Mon, 12 Sep 2011 20:42:53 +0000 (20:42 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39667 a592a061-630c-0410-9148-cb99ea01b6c8

lib/scripts/prefs2prefs.py

index 55ff96abb388b7c7ba024085f24dcda56b631e7a..b29bb74528b773196bf51d14e8f7e66dc4e3a1be 100644 (file)
@@ -120,7 +120,7 @@ def usage():
        print "or: %s [-l] [-p] <infile >outfile" % sys.argv[0]
        print "  -l: convert LFUNs (bind and ui files)"
        print "  -p: convert preferences"
-       print "Note that one of -l and -p is required."
+       print "Note that exactly one of -l and -p is required."
 
 
 def main(argv):
@@ -155,7 +155,11 @@ def main(argv):
        
        if not conversions:
                usage()
-               print "\nNeither -l nor -p given"
+               print "\nNeither -l nor -p given."
+               sys.exit(1)
+       elif len(options) > 1:
+               usage()
+               print "\nOnly one of -l or -p should be given."
                sys.exit(1)
 
        current_format = len(conversions)