quick fix to scmtools/hg.py exception due to miss named urllib @svn 1445
Updated 4 months, 3 weeks ago
| Tom Saeger | Reviewers | ||
| reviewboard | |||
| None | Review Board SVN | ||
trivial fix - use urllib2 instead of urllib
worked locally with the attached fix.
Diff revision 1 (Latest)
- /trunk/reviewboard/scmtools/hg.py: 1 change [ 1 ]
| /trunk/reviewboard/scmtools/hg.py | |||
|---|---|---|---|
| Revision 1445 | New Change | ||
| ... | 96 lines hidden [Expand] | ||
| 97 | passman = urllib2.HTTPPasswordMgrWithDefaultRealm() |
97 | passman = urllib2.HTTPPasswordMgrWithDefaultRealm() |
| 98 | passman.add_password(None, self.url, self.username, self.password) |
98 | passman.add_password(None, self.url, self.username, self.password) |
| 99 | authhandler = urllib2.HTTPBasicAuthHandler(passman) |
99 | authhandler = urllib2.HTTPBasicAuthHandler(passman) |
| 100 | opener = urllib2.build_opener(authhandler) |
100 | opener = urllib2.build_opener(authhandler) |
| 101 | f = opener.open('%s/raw-file/%s/%s' % |
101 | f = opener.open('%s/raw-file/%s/%s' % |
| 102 | (self.url, rev, urllib.quote(path))) |
102 | (self.url, rev, urllib2.quote(path))) |
| 103 | return f.read() |
103 | return f.read() |
| 104 | except Exception, e: |
104 | except Exception, e: |
| 105 | raise FileNotFoundError(path, rev, str(e)) |
105 | raise FileNotFoundError(path, rev, str(e)) |
| 106 | 106 | ||
| 107 | def get_filenames(self, rev): |
107 | def get_filenames(self, rev): |
| ... | 22 lines hidden [Expand] | ||
- /trunk/reviewboard/scmtools/hg.py: 1 change [ 1 ]
Other reviews