Skip to content

Commit 6d853a7

Browse files
committed
Py2.6: ignore missing _url_collapse_path in CGIHTTPServer
1 parent 5372c90 commit 6d853a7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

future/moves/http/server.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
try:
1212
from CGIHTTPServer import _url_collapse_path # needed for a test
1313
except ImportError:
14-
# python 2.7.3
15-
from CGIHTTPServer import (
16-
_url_collapse_path_split as _url_collapse_path)
14+
try:
15+
# Python 2.7.0 to 2.7.3
16+
from CGIHTTPServer import (
17+
_url_collapse_path_split as _url_collapse_path)
18+
except ImportError:
19+
# Doesn't exist on Python 2.6.x. Ignore it.
20+
pass

0 commit comments

Comments
 (0)