View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000563 | Other Unix Port | Bug | public | 2013-02-07 07:38 | 2022-05-14 07:14 |
Reporter | Steven Levine | Assigned To | psmedley | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | eCS/OS2 | OS | eComstation or OS/2 | OS Version | 1.x 2.x or 4.5 |
Summary | 0000563: hg import fails with abort: error: file not on local host | ||||
Description | The command hg import ./remove_include_dir where remove_include_dir is a file fails with the error abort: error: file not on local host This occurs because the drive letter confuses the url parsing code urllib2.py. The attached patch to open_local_file() resolves this issue. Long term, the patch should be implemented to splithost() in urllib.py so that all calls to get_host() and get_selector() return valid values. | ||||
Tags | No tags attached. | ||||
Attached Files | urllib2.py.diff (640 bytes)
--- D:\usr\python27\lib\.saved\urllib2-20120430-0217.py 2012-04-30 02:17:12.000000000 -0700 +++ D:\usr\python27\lib\urllib2.py 2013-02-06 23:17:14.000000000 -0800 @@ -1327,6 +1327,13 @@ import mimetypes host = req.get_host() filename = req.get_selector() + + # 2013-02-06 SHL FIXME to be done in splithost() in urllib.py + # YD hack: add again drive name + if os.name == 'os2' and len(host)>1 and host[1] == ':': + filename = host + filename + host = "" + localfile = url2pathname(filename) try: stats = os.stat(localfile) | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2013-02-07 07:38 | Steven Levine | New Issue | |
2013-02-07 07:38 | Steven Levine | File Added: urllib2.py.diff | |
2022-05-14 07:14 | psmedley | Assigned To | => psmedley |
2022-05-14 07:14 | psmedley | Status | new => resolved |
2022-05-14 07:14 | psmedley | Resolution | open => won't fix |
2022-05-14 07:14 | psmedley | Note Added: 0004293 | |
2022-05-14 07:14 | psmedley | Status | resolved => closed |