#! /bin/sh -e dir= if [ $# -eq 3 -a "$2" = '-d' ]; then pdir="-d $3" dir="$3/" elif [ $# -ne 1 ]; then echo >&2 "usage: `basename $0`: -patch|-unpatch [-d ]" exit 1 fi case "$1" in -patch) patch $pdir -f --no-backup-if-mismatch -p0 < $0 ;; -unpatch) patch $pdir -f --no-backup-if-mismatch -R -p0 < $0 ;; *) echo >&2 "usage: `basename $0`: -patch|-unpatch [-d ]" exit 1 esac exit 0 --- Lib/site.py 2004-07-20 12:28:28.000000000 +1000 +++ Lib/site.py 2006-11-09 09:28:32.000000000 +1100 @@ -393,6 +393,14 @@ # this module is run as a script, because this code is executed twice. if hasattr(sys, "setdefaultencoding"): del sys.setdefaultencoding + # install the apport exception handler if available + try: + import apport_python_hook + except ImportError: + pass + else: + apport_python_hook.install() + main()