Merge lp:~alecu/ubuntuone-client/proxy-tunnel-auth into lp:ubuntuone-client
| Status: | Merged | ||||
|---|---|---|---|---|---|
| Approved by: | Alejandro J. Cura on 2012-03-16 | ||||
| Approved revision: | 1239 | ||||
| Merged at revision: | 1211 | ||||
| Proposed branch: | lp:~alecu/ubuntuone-client/proxy-tunnel-auth | ||||
| Merge into: | lp:ubuntuone-client | ||||
| Diff against target: |
417 lines (+212/-24) 3 files modified
tests/proxy/test_tunnel_server.py (+128/-3) ubuntuone/proxy/common.py (+0/-2) ubuntuone/proxy/tunnel_server.py (+84/-19) |
||||
| To merge this branch: | bzr merge lp:~alecu/ubuntuone-client/proxy-tunnel-auth | ||||
| Related bugs: |
|
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Diego Sarmentero (community) | Approve on 2012-03-16 | ||
| Manuel de la Peña (community) | 2012-03-15 | Approve on 2012-03-16 | |
|
Review via email:
|
|||
Commit Message
- Use proxy credentials from the keyring (LP: #929207)
Description of the Change
- Use proxy credentials from the keyring (LP: #929207)
- 1238. By Alejandro J. Cura on 2012-03-15
-
merged from trunk
| Alejandro J. Cura (alecu) wrote : | # |
> Everything looks good, here are some small comments:
>
> return QNetworkProxy(
>
> As far as I understand this, the tunnel will use no proxy ignoring the
> application level proxy. I think it might be more appropriate to return
> QNetworkProxy(
> the code use a higher alternative, for example the application-level proxy
> settings. I know that we are using build_proxy to set the application level
> proxy, but I want to be 100% saure that we do the right thing, also when the
> proxy is the application level proxy DefaultProxy and NoProxy have the same
> meaning therefore in our current code we will be using the same.
I've fixed this, thanks for the suggestion.
> Maybe we could ensure that self.proxy_domain is always a python string and not
> a QString in memory, it would be as simple as changing:
>
> 340 + self.proxy_domain = proxy.hostName()
>
> for
>
> 340 + self.proxy_domain = str(proxy.
>
> I think it would be less error prone, what is you opinion?
I don't think that's needed, since most uses of self.proxy_domain are for comparing again proxy.hostName(). In the only place where it's sent from the containing object to the keyring.
I'm now pushing the branch with the first fix requested.
Thanks for the review!
- 1239. By Alejandro J. Cura on 2012-03-16
-
Change fallback from NoProxy to DefaultProxy.
| Diego Sarmentero (diegosarmentero) wrote : | # |
I have this failure running the tests:
[ERROR]
Traceback (most recent call last):
File "/usr/lib/
result = g.send(result)
File "/media/
oauth_
exceptions.
tests.syncdaemo
| Alejandro J. Cura (alecu) wrote : | # |
> I have this failure running the tests:
>
> [ERROR]
> Traceback (most recent call last):
> File "/usr/lib/
> 1039, in _inlineCallbacks
> result = g.send(result)
> File "/media/
> last/ubuntuone/
> oauth_sign_
> exceptions.
> 'connector'
>
> tests.syncdaemo
Looks like the ussoc you are using is not trunk.
Try updating nightlies or configuring this branch using "--with-


Everything looks good, here are some small comments:
return QNetworkProxy( QNetworkProxy. NoProxy)
As far as I understand this, the tunnel will use no proxy ignoring the application level proxy. I think it might be more appropriate to return QNetworkProxy( QNetworkProxy. DefaultProxy) . Returning default proxy will make the code use a higher alternative, for example the application-level proxy settings. I know that we are using build_proxy to set the application level proxy, but I want to be 100% saure that we do the right thing, also when the proxy is the application level proxy DefaultProxy and NoProxy have the same meaning therefore in our current code we will be using the same.
This is just a save guard, so is certainly not blocking the code from landing.
Maybe we could ensure that self.proxy_domain is always a python string and not a QString in memory, it would be as simple as changing:
340 + self.proxy_domain = proxy.hostName()
for
340 + self.proxy_domain = str(proxy. hostName( ))
I think it would be less error prone, what is you opinion?
I'll approve even with the above comments.