Fwd: Testing a potential One Point Oh tarball/zip
Baz
brian.ewins at gmail.com
Mon Feb 6 22:18:45 EST 2006
On 2/5/06, A.M. Kuchling <amk at amk.ca> wrote:
> On Mon, Feb 06, 2006 at 01:01:15AM +1100, Jeff Waugh wrote:
> > This is not a release announcement. Please test (what may end up being) the
> > Planet 1.0 release tarball/zip here, so it can be released later this week:
Just retested on Win XP, since I see an MS-specific change went in to
escape the cache filenames.
The cache filenames problem appears to be fixed.
I still have the problem with precompiled templates not working. to
reproduce, simply run planet blah/config.ini twice - the second run
will fail every time:
...
File "C:\planet-1.0\planet\htmltmpl.py", line 284, in lock_file
msvcrt.locking(fd, msvcrt.LK_UNLCK, 1)
IOError: [Errno 13] Permission denied
in my copy of planet.py I've now changed the call to the
TemplateManager like so:
# precompilation doesn't work on windows
try:
import msvcrt
locks_work = 0
except:
locks_work = 1
# Go-go-gadget-template
manager = planet.htmltmpl.TemplateManager(precompile = locks_work)
'works for me'. As I said before, this appears to be a known bug in
htmltmpl but I thought it better to go for a workaround thats local to
planet.
There's another problem I hadn't spotted before. When a feed moves,
the code attempts to create a symlink from the old cache to the new
one, which of course doesn't work on XP:
WARNING:planet:Feed has moved from
<http://www.gnome.org/~jdub/blog/?flav=rss> to
<http://perkypants.org/blog/feed/>
ERROR:planet.runner:Update of <http://www.gnome.org/~jdub/blog/?flav=rss> failed
Traceback (most recent call last):
File "C:\j\planet-1.0\planet.py", line 158, in main
channel.update()
File "C:\j\planet-1.0\planet\__init__.py", line 340, in update
os.link(cache.filename(self._planet.cache_directory, self.url),
There's no reason for this exception to stop processing of the feed,
since it appears the symlink isn't used immediately, it's just there
to help migrate the cache at a later date. So I fixed the problem
locally like so:
elif info.status == 301 or info.status == 302:
log.warning("Feed has moved from <%s> to <%s>", self.url, info.url)
try:
os.link(cache.filename(self._planet.cache_directory, self.url),
cache.filename(self._planet.cache_directory, info.url))
except:
log.error("Symlink failed. Please change feed URL and
fix cache manually")
self.url = info.url
it seems to me like these two workarounds should only kick in on
MSWin, but then again, all the python I know comes from taking a look
at the code of planet.
Cheers,
Baz
More information about the devel
mailing list