From 41b747c4c2ce4a6acba4e318249641fd41e91123 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 5 Apr 2014 20:18:09 +0200 Subject: document and demo reset_on_error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- examples/comprehensive | 7 +++++++ info/blueshift.texinfo | 7 +++++++ src/__main__.py | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/examples/comprehensive b/examples/comprehensive index 7510744..b95e5c3 100644 --- a/examples/comprehensive +++ b/examples/comprehensive @@ -338,6 +338,13 @@ uses_adhoc_opts = True ''' +reset_on_error = True +''' +:bool Whether to reset the colour curves if the configuration script + runs into an exception that it did not handle +''' + + # Get --reset from Blueshift ad-hoc settigns doreset = parser.opts['--reset'] diff --git a/info/blueshift.texinfo b/info/blueshift.texinfo index 55dcbed..cafba90 100644 --- a/info/blueshift.texinfo +++ b/info/blueshift.texinfo @@ -1096,6 +1096,13 @@ run @code{reset} and exit. This is normally done the second time @kbd{Control+c} is pressed or the second time a SIGTERM signal has been received. (Or if both has happend.) + +@item reset_on_error +The default value of this variable is @code{True}, +but it can be set to @code{False}. If it is set to +false @code{False}, Blueshift will not attempt to +reset the colour curves if the configuration script +crashes. @end table The parameterless function @code{continuous_run}, diff --git a/src/__main__.py b/src/__main__.py index 535c43a..e514728 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -216,7 +216,7 @@ trans_delta = -1 :int In what direction are with transitioning? ''' -reset_on_error = True # TODO demo and document this +reset_on_error = True ''' :bool Whether to reset the colour curves if the configuration script runs into an exception that it did not handle -- cgit v1.2.3-70-g09d2