select.error: (9, 'Bad file descriptor')

219 views
Skip to first unread message

Equand

unread,
Jul 3, 2008, 2:19:53 PM7/3/08
to Python FTP server library - Discussion group
Traceback (most recent call last):
File "./sysfiletd", line 275, in <module>
ftpd.serve_forever()
File "/usr/local/lib/python2.5/site-packages/pyftpdlib/
ftpserver.py", line 2892, in serve_forever
asyncore.loop(timeout=1.0, use_poll=False)
File "/usr/local/lib/python2.5/asyncore.py", line 191, in loop
poll_fun(timeout, map)
File "/usr/local/lib/python2.5/asyncore.py", line 121, in poll
r, w, e = select.select(r, w, e, timeout)
select.error: (9, 'Bad file descriptor')

got this
something looks like not protected heh...

testsuite:
#!/usr/bin/env python
import time
import threading
from ftplib import FTP

class Testss(threading.Thread):
def __init__(self, host):
self.host = host
threading.Thread.__init__(self)
self.finished = threading.Event()

def run(self):
self.finished.wait(2)
ftp = FTP(self.host)
ftp.login("test", "password")
ftp.retrlines('LIST')
self.finished.wait(30)
self.finished.set()

if __name__ == "__main__":
d = []
k = 0
host = ftp.test.com
while k < 30:
p = Testss(host)
d.append(p)
p.start()
k += 1

(throws some exceptions but works)

Equand

unread,
Jul 3, 2008, 4:59:39 PM7/3/08
to Python FTP server library - Discussion group
sorry seems like my bad...
i'll look in further...
Reply all
Reply to author
Forward
0 new messages