Commit aa0d4f47 authored by Jeremy Hylton's avatar Jeremy Hylton

Make sure asyncore is defined one way or another

parent e354e393
...@@ -109,6 +109,8 @@ def fap(where=''): ...@@ -109,6 +109,8 @@ def fap(where=''):
# Try a little harder to import ZServer # Try a little harder to import ZServer
import os, imp import os, imp
asyncore = None
for location in where, '.', os.path.join('..','..'): for location in where, '.', os.path.join('..','..'):
if whiff(location): if whiff(location):
sys.path.append(location) sys.path.append(location)
...@@ -118,6 +120,9 @@ def fap(where=''): ...@@ -118,6 +120,9 @@ def fap(where=''):
import asyncore import asyncore
break break
if asyncore is None:
import asyncore
if sys.version[:1] < '2' and asyncore.loop.func_code.co_argcount < 3: if sys.version[:1] < '2' and asyncore.loop.func_code.co_argcount < 3:
raise ImportError, 'Cannot import an up-to-date asyncore' raise ImportError, 'Cannot import an up-to-date asyncore'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment