Fix the NOTIFY example to use the correct APIs

This commit is contained in:
Jan Urbański 2010-04-18 15:54:32 +02:00 committed by Daniele Varrazzo
parent 067161d5f3
commit a57a9976b4

View File

@ -36,8 +36,8 @@ curs.execute("listen test")
print "Waiting for 'NOTIFY test'"
while 1:
if select.select([curs],[],[],5)==([],[],[]):
if select.select([curs.connection],[],[],5)==([],[],[]):
print "Timeout"
else:
if not curs.poll():
if not curs.connection.poll():
print "Got NOTIFY: %s" % str(curs.connection.notifies.pop())