going-flying.com gemini git repository
52c5eab3fae4769ece7501c216e201b2841f5a26 - Matthew Ernisse - 1614710921
some subtle thing I do not understand in decorators with vs without arguments
diff --git a/cgi-bin/gmicgi/__init__.py b/cgi-bin/gmicgi/__init__.py index c720d28..8909d3f 100755 --- a/cgi-bin/gmicgi/__init__.py +++ b/cgi-bin/gmicgi/__init__.py @@ -153,9 +153,9 @@ class GeminiCGI(object): ''' Decorator to request input from the user.''' def decorator(f): if not self.query_string: - return self.Response.Input(msg) + return lambda: self.Response.Input(msg) - return f() + return f return decorator