From ba02c43178d32aa97979b140e2596b5227ce9ac2 Mon Sep 17 00:00:00 2001 From: Julien Rioux Date: Mon, 12 Sep 2011 20:42:53 +0000 Subject: [PATCH] * prefs2prefs.py : Error when both -l and -p are given, update usage. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39667 a592a061-630c-0410-9148-cb99ea01b6c8 --- lib/scripts/prefs2prefs.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/scripts/prefs2prefs.py b/lib/scripts/prefs2prefs.py index 55ff96abb3..b29bb74528 100644 --- a/lib/scripts/prefs2prefs.py +++ b/lib/scripts/prefs2prefs.py @@ -120,7 +120,7 @@ def usage(): print "or: %s [-l] [-p] 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) -- 2.39.2