Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.020 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'cookie': 0.09; 'try:': 0.09; 'cc:addr:python-list': 0.11; 'errors:': 0.16; 'exceptions,': 0.16; 'expect,': 0.16; 'thread,': 0.16; 'unexpected': 0.16; 'cc:addr:python.org': 0.22; 'subject:problem': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; 'keyerror:': 0.31; 'except': 0.35; 'but': 0.35; 'received:google.com': 0.35; "didn't": 0.36; 'skip:o 20': 0.38; 'catch': 0.60; 'identify': 0.61; 'from:charset:iso-8859-9': 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=l29sIGqOajkTzEWgmy2v+jh89IlKO92CPN20IkR5Wu8=; b=iY1gwGyWuI9FUBC1ThYbATw4w5jFyF8GxtadzsqQMZWhjdDkBuL5uQ2JZwcpjX924F bN8+SaZEsxZyAHH3Jfmi4/aqAWjK4sIFsaGc82q5qsbM+ERqjGRFw/jazTDHsXwoPWPL huIF6Aid0lgDbQtXOaHJIih5f1kKQvZcD/zoxRiMuCHZaBWsLUlIm5HwWUddBJz797bf +Ow6yPG0ZDS9q1dM2C0lshN8YG5meUymxCktSshtJuVstPS4XoAxBUtb427KwMGIk2Iu x06Is49jGDL+Og60UaOobg31zxLYKyYBUk74UVEh4N4rfnrpi1Pkj2nVjRTPr7w1/JoX GzEg== MIME-Version: 1.0 X-Received: by 10.205.78.199 with SMTP id zn7mr26140bkb.59.1382796306833; Sat, 26 Oct 2013 07:05:06 -0700 (PDT) In-Reply-To: <7w4n84b16r.fsf@benfinney.id.au> References: <7w4n84b16r.fsf@benfinney.id.au> Date: Sat, 26 Oct 2013 17:05:06 +0300 Subject: Re: Cookie fucking problem From: =?ISO-8859-9?Q?Ya=FEar_Arabac=FD?= To: Ben Finney Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382796674 news.xs4all.nl 15953 [2001:888:2000:d::a6]:48502 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57609 I didn't follow the thread, I am sorry if this is duplicate, but don't catch all Exceptions, catch only the ones you expect, so that you can identify unexpected errors: cookie = cookies.SimpleCookie( os.environ['HTTP_COOKIE'] ) try: cookieID = cookie['name'].value except KeyError: cookieID = 'visitor' -- http://ysar.net/