mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-22 08:56:34 +03:00
Fix the NOTIFY example to use the correct APIs
This commit is contained in:
parent
067161d5f3
commit
a57a9976b4
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue
Block a user