Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'exit': 0.07; 'shutil': 0.07; 'subject:adding': 0.07; '(it': 0.09; 'exception,': 0.09; 'cc:addr:python-list': 0.10; 'systemexit': 0.16; 'there?': 0.16; 'trying': 0.21; 'exceptions': 0.22; 'explicit': 0.22; 'cc:2**0': 0.23; 'mention': 0.23; 'raise': 0.24; 'cc:no real name:2**0': 0.24; 'specifically': 0.24; 'cc:addr:python.org': 0.25; 'header :In-Reply-To:1': 0.25; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'this?': 0.28; 'catching': 0.29; 'writes:': 0.29; 'anywhere': 0.33; "can't": 0.34; 'received:google.com': 0.34; 'done': 0.34; "won't": 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'possible': 0.37; 'why': 0.37; 'quite': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'header:Received:5': 0.40; 'think': 0.40; 'john': 0.60; 'andrea': 0.84; 'subject:mode': 0.84; 'to:addr:gordon': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=teT8qVHYy7obVMoTVonUa0ei6qMw9KhHgxHmGXk5AS8=; b=Ak5NE+AYY+Nk6y5JwB3cJj8oBxu/8jKvXL/DyFmWqn1gffjsU7ZW+xhfCxESVXwJF1 cjVMMS+zY9ONkJlsE4S0krpItf8DuAU+FpMpTYWM+vEerFfY/8h83tisoAAFztoGq/Xi anTnwCEexu2AseUKyGrZKcOdM0kycsWHhvdrVNP5X02qX6aLuPL5b6pd5WnnxnXIUlJS LAR6BJimyZvH95iaKrm0Q2YSc9q4mak49fdcFrEdzD+NAx31GVDlCclMjqGy6GMuI2fn bOYER6G7NQRmyXCg8/oz09cjLJQgNsTCbYU0xQw6PmtcTZqPxHace5VPI69i97BQg31+ w0DA== MIME-Version: 1.0 In-Reply-To: References: <87liiyr48f.fsf@handshake.de> Date: Thu, 12 Jul 2012 16:37:42 +0100 Subject: Re: adding a simulation mode From: andrea crotti To: John Gordon Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1342107465 news.xs4all.nl 6840 [2001:888:2000:d::a6]:60457 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:25222 2012/7/12 John Gordon : > In andrea crotti writes: > >> Well that's what I thought, but I can't find any explicit exit >> anywhere in shutil, so what's going on there? > > Try catching SystemExit specifically (it doesn't inherit from Exception, > so "except Exception" won't catch it.) > > -- Ah yes that actually works, but I think is quite dodgy, why was it done like this? In shutil there is still no mention of SystemExit, and trying to raise the single exceptions by and doens't still make it exit, so I would still like to know how it is possible just for curiosity..