Re: Maybe problems with Metakit 2.4.9.3

Yasushi Iwata <yasusii-aid3/A5iOTfPDbFq/[email protected]> Tue, 20 Apr 2004 12:08:51 +0900 (JST)
Newsgroups gmane.comp.python.pyds.user
Message-ID <[email protected]>
Hi,

I found this code causes segmentation fault with Metakit 2.4.9.3. But
no problem with 2.4.9.2.

--
import metakit

db = metakit.storage('foo.dat', 1)

comments = db.getas(
    'comments[user:S, paragraph:S, link:S, notes[name:S, email:S, url:S, comment:S, date:S]]').ordered( 2 )

user = '0000001'
paragraph = 'P1'
link = 'http://foobar.com/weblog/2004/04/20.html#P1'

print 'Now, appending...'
comments.append({
    'user': user,
    'paragraph': paragraph,
    'link': link,
    'notes': metakit.view()
    })
print 'Appended.'
db.commit()
print 'committed.'