A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-March/052490.html below:

[Python-Dev] Weekly Python Patch/Bug Summary

python.org/sf URLs aren't working? Re: [Python-Dev] Weekly Python Patch/Bug Summary"Martin v. Löwis" martin at v.loewis.de
Thu Mar 31 22:01:09 CEST 2005
Skip Montanaro wrote:
> Here's a traceback:
> 
>     Traceback (most recent call last):
>       File "/usr/local/apache/cgi-bin/sf", line 82, in ?
>         log_type(report, tracker)
>       File "/usr/local/apache/cgi-bin/sf", line 42, in log_type
>         os.unlink(idsfile+".lck")
>     OSError: [Errno 2] No such file or directory: '/tmp/sourceforge-ids.txt.lck'
> 
> and here's the script.  It looks like lock file creation is failing but
> log_type() isn't returning, so in the finally clause deletion fails.

Somebody took "world" write permission on /tmp away; I don't know 
whether this was intentional - I have restored them for a moment.

The script actually has two errors: it is not os.sleep, but time.sleep
(so it would only try one time, not ten times); plus (and I'm glad
you did not catch that, either :-) the finally block is always executed,
even if the file was not created, and even if the function is left
through return.

I've fixed the script, however, if somebody takes away o+w on /tmp
again, it will mean that the caching silently stops.

Regards,
Martin

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4