diff options
-rw-r--r-- | asciidoc/a2x.py | 2 | ||||
-rw-r--r-- | asciidoc/asciidoc.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/asciidoc/a2x.py b/asciidoc/a2x.py index 84a9334..9343288 100644 --- a/asciidoc/a2x.py +++ b/asciidoc/a2x.py @@ -1004,6 +1004,7 @@ def parse_args(argv): def cli(): global OPTIONS + asciidoc.set_caller("__main__") argv, opts, args = parse_args(sys.argv) opts = eval(str(opts)) # Convert optparse.Values to dict. a2x = A2X(opts) @@ -1021,5 +1022,4 @@ def cli(): ##################################################################### if __name__ == "__main__": - asciidoc.set_caller(__name__) cli() diff --git a/asciidoc/asciidoc.py b/asciidoc/asciidoc.py index de79957..9d53b3d 100644 --- a/asciidoc/asciidoc.py +++ b/asciidoc/asciidoc.py @@ -9,7 +9,7 @@ Copyright (C) 2013-2022 AsciiDoc Contributors. Free use of this software is granted under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -5864,6 +5864,7 @@ def execute(cmd, opts, args): def cli(argv=None): + set_caller("__main__") if argv is None: argv = sys.argv # Process command line options. |