From 837f87175b816ab309df25a709920b2ffcbae737 Mon Sep 17 00:00:00 2001 From: Joaquin Santos Date: Sat, 10 Oct 2015 12:43:48 -0700 Subject: [PATCH] Added forced exit on load_build_config exception Added load_build_config & monospace_display to README.md --- README.md | 6 +++++- gooey/python_bindings/gooey_decorator.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f6eb7ca..e6920ff 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,9 @@ Different styling and functionality can be configured by passing arguments into default_size=(610, 530), # starting size of the GUI required_cols=1, # number of columns in the "Required" section optional_cols=2, # number of columbs in the "Optional" section - dump_build_config=False) # Dump the JSON Gooey uses to configure itself + dump_build_config=False, # Dump the JSON Gooey uses to configure itself + load_build_config=None, # Loads a JSON Gooey-generated configuration + monospace_display=False) # Uses a mono-spaced font in the output screen ) def main(): parser = ArgumentParser(...) @@ -249,6 +251,8 @@ Just about everything in Gooey can be customized by passing arguments to the dec | required_cols | Controls how many columns are in the Required Arguments section | | optional_cols | Controls how many columns are in the Optional Arguments section | | dump_build_config | Saves a `json` copy of its build configuration on disk for reuse/editing | +| load_build_config | Loads a `json` copy of its build configuration from disk | +| monospace_display | Uses a mono-spaced font in the output screen | diff --git a/gooey/python_bindings/gooey_decorator.py b/gooey/python_bindings/gooey_decorator.py index f4b7122..122d668 100644 --- a/gooey/python_bindings/gooey_decorator.py +++ b/gooey/python_bindings/gooey_decorator.py @@ -51,6 +51,7 @@ def Gooey(f=None, build_spec = json.load(open(load_build_config, "r")) except Exception, e: print( 'Exception loading Build Config from {0}: {1}'.format(load_build_config, e)) + sys.exit(1) if not build_spec: build_spec = config_generator.create_from_parser(self, source_path, payload_name=payload.__name__, **params)