From acf5e4a677facd7c1e2ccd8bf13d3bafddc99bac Mon Sep 17 00:00:00 2001 From: Worros Date: Wed, 15 Dec 2010 12:50:23 +0800 Subject: [PATCH] THP: Make THP use new Options.site_aliases function --- pyfpdb/TestHandsPlayers.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pyfpdb/TestHandsPlayers.py b/pyfpdb/TestHandsPlayers.py index 2d978e67..177fe9e2 100755 --- a/pyfpdb/TestHandsPlayers.py +++ b/pyfpdb/TestHandsPlayers.py @@ -157,6 +157,10 @@ def walk_testfiles(dir, function, importer, errors, site): else: compare(nfile, importer, errors, site) +def usage(): + print "USAGE:" + sys.exit(0) + def main(argv=None): if argv is None: argv = sys.argv[1:] @@ -166,11 +170,12 @@ def main(argv=None): test_all_sites = True if options.usage == True: - #Print usage examples and exit - print "USAGE:" - sys.exit(0) + usage() if options.sitename: + options.sitename = Options.site_alias(options.sitename) + if options.sitename == False: + usage() print "Only regression testing '%s' files" % (options.sitename) test_all_sites = False