🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.os.windows-11
Article #920

Re: PSA: Python script for selecting Tor exit nodes in Firefox Tor Browser

#920
From: Lawrence D’Oliveiro
Date: Mon, 09 Nov 2026 22:49
22 lines
1874 bytes
On Mon, 9 Nov 2026 10:27:21 -0400, Maria Sophia wrote:

>      try:
>
>      ...
>  
>      except Exception as e:
>          print(f"\nError: {e}", file=sys.stderr)
>          sys.exit(1)
>      finally:
>          if stream:
>              try:
>                  stream.close()
>              except Exception:
>                  pass
>          if s:
>              try:
>                  s.close()
>              except Exception:
>                  pass

Get rid of that enclosing try-block.
Technical Details
Message-ID: <11ctim4$1lilf$6@dont-email.me>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11cqjk5$13lp$1@nnrp.usenet.blueworldhosting.com> <11csl88$15ur$1@nnrp.usenet.blueworldhosting.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.python,alt.comp.os.windows-11,comp.sys.mac.system
Subject: Re: PSA: Python script for selecting Tor exit nodes in Firefox Tor
 Browser
Date: Mon, 9 Nov 2026 22:49:40 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <11ctim4$1lilf$6@dont-email.me>
References: <11cqjk5$13lp$1@nnrp.usenet.blueworldhosting.com>
	<11csl88$15ur$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 09 Nov 2026 22:49:41 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1755823"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+Luz4fUgyAwAc9PpXfrU3r"; posting-host="b0c2c8b7b1ddf4d4862b04a4598f7af2"
User-Agent: Pan/0.165 (Kostiantynivka)
Cancel-Lock: sha1:+qZgRHbQz+1YVkDurIqWq7wsTFE= sha256:QuMYR2ju7HCWY86iGDMZw7glqNV3zxvCdhr2EPIZQJ4=
	sha1:p7//kTfMvxadUGmngD6ZqzzBAJU= sha256:GsLEV9igmC9Z8fh4l6yl91HERh84upXCPbQHKcGFdnM=