Bugs item #1650899, was opened at 2007-02-02 21:27
Message generated for change (Comment added) made by tebeka
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650899&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: Miki Tebeka (tebeka)
Assigned to: Nobody/Anonymous (nobody)
Summary: sys.excepthook does not work with -m command line switch

Initial Comment:
crashlog.py is the following:
  import sys

  def excepthook(type, value, traceback):
      print "BUMMER"

  sys.excepthook = excepthook

When crash.py is like:
  import crashlog
  raise ValueError("so sad")

The it works as expected:
  [EMAIL PROTECTED] - 11:22] ~ $python crash.py 
  BUMMER
  [EMAIL PROTECTED] - 11:23] ~ $

However when I try to load crashlog using -m and leave crash.py like:
  raise ValueError("so sad")

The nothing (not even original excepthook is called):
  [EMAIL PROTECTED] - 11:23] ~ $python -m crashlog crash.py
  [EMAIL PROTECTED] - 11:25] ~ $



----------------------------------------------------------------------

>Comment By: Miki Tebeka (tebeka)
Date: 2007-02-02 21:42

Message:
Logged In: YES 
user_id=358087
Originator: YES

Didn't understand how -m works, my bad

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1650899&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to