From: Julien Rioux Date: Mon, 12 Sep 2011 20:42:53 +0000 (+0000) Subject: * prefs2prefs.py : Error when both -l and -p are given, update usage. X-Git-Tag: 2.1.0beta1~2720 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ba02c43178d32aa97979b140e2596b5227ce9ac2;p=features.git * 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 --- 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)