Commit 13e626a3 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Bring pywiscombe execution under try block

parent e8b6a0e5
Loading
Loading
Loading
Loading
+21 −22
Original line number Diff line number Diff line
@@ -41,12 +41,7 @@ def main():
    errors = 0
    try:
        config = parse_arguments()
    except ValueError as ex:
        print(ex)
        print("\nRun \"pywiscombe.py --help\" to get more detailed help.")
        errors = 1
        if config['help_mode']:
        config['help_mode'] = True
            print_help()
        else:
            if (config['mode'] == ''):
@@ -67,6 +62,10 @@ def main():
                elif (config['mode'] == 'LE'):
                    lmax = 1 + int(math.ceil(x + 11.0 * math.pow(x, 1.0 / 3.0)))
                print("Suggested truncation order is Lmax = %d"%lmax)
    except ValueError as ex:
        print(ex)
        print("\nRun \"pywiscombe.py --help\" to get more detailed help.")
        errors = 1
    return errors

## \brief Parse the command line arguments.