diff --git a/tupak/core/sampler.py b/tupak/core/sampler.py index 09efaaa90cc6f4f4dbd883f633d8b727fb0b0903..6ef63b94edce78916030d27a895b6a240cd8cf81 100644 --- a/tupak/core/sampler.py +++ b/tupak/core/sampler.py @@ -1909,7 +1909,11 @@ if utils.command_line_args.sampler_help: print('Help for sampler "{}":'.format(sampler)) print(sampler_class.__doc__) else: - print('Requested sampler {} not implemented.') + if sampler == "None": + print('For help with a specific sampler, call sampler-help with ' + 'the name of the sampler') + else: + print('Requested sampler {} not implemented'.format(sampler)) print('Available samplers = {}'.format(implemented_samplers)) sys.exit() diff --git a/tupak/core/utils.py b/tupak/core/utils.py index bef5a3942f74ae7c1d1b887e88cfa1fef183c557..3cd5a9f4e15925a2c61c7aea35ec796495b5056a 100644 --- a/tupak/core/utils.py +++ b/tupak/core/utils.py @@ -435,7 +435,8 @@ def set_up_command_line_arguments(): help="Force clean data, never use cached data") parser.add_argument("-u", "--use-cached", action="store_true", help="Force cached data and do not check its validity") - parser.add_argument("--sampler-help", help=("Print help for given sampler")) + parser.add_argument("--sampler-help", nargs='?', default=False, + const='None', help="Print help for given sampler") parser.add_argument("-t", "--test", action="store_true", help=("Used for testing only: don't run full PE, but" " just check nothing breaks"))