From b289f6796ef213a83595db77c06b7586cdbcb730 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 18 Jun 2010 16:22:59 +0200 Subject: main: catch SystemExit and return the exit value --- ranger.py | 5 +++-- ranger/__main__.py | 4 ++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ranger.py b/ranger.py index ccc9f0d6..f290d796 100755 --- a/ranger.py +++ b/ranger.py @@ -30,6 +30,8 @@ fi return 1 """ +import sys + # Redefine the docstring, since the previous one was hijacked to # embed a shellscript. __doc__ = """Ranger - file browser for the unix terminal""" @@ -40,7 +42,6 @@ __doc__ = """Ranger - file browser for the unix terminal""" try: from ranger.__main__ import main except ImportError: - import sys if '-d' not in sys.argv and '--debug' not in sys.argv: print("Can't import the main module.") print("To run an uninstalled copy of ranger,") @@ -48,4 +49,4 @@ except ImportError: else: raise else: - main() + sys.exit(main()) diff --git a/ranger/__main__.py b/ranger/__main__.py index a03509cf..a3e0ef1c 100644 --- a/ranger/__main__.py +++ b/ranger/__main__.py @@ -212,6 +212,8 @@ def main(): except Exception: import traceback crash_traceback = traceback.format_exc() + except SystemExit as error: + return error.args[0] finally: try: fm.ui.destroy() @@ -222,6 +224,8 @@ def main(): print("Ranger crashed. " \ "Please report this (including the traceback) at:") print("http://savannah.nongnu.org/bugs/?group=ranger&func=additem") + return 1 + return 0 if __name__ == '__main__': -- cgit 1.4.1-2-gfad0 ary/Implementation/HTAnchor.h?id=aaa10562f4a02971f712964cb2fd1014d2a75d33'>blame commit diff stats
path: root/WWW/Library/Implementation/HTAnchor.h
blob: 2cbe0d4ac0861ddc21c6c71d15089ac0268ae850 (plain) (tree)
1
2
3
4
5
6
7
8
9