Merge lp:~mikemc/ubuntuone-storage-protocol/fix-1025950-cert-locs into lp:ubuntuone-storage-protocol
| Status: | Merged |
|---|---|
| Approved by: | Alejandro J. Cura on 2012-08-16 |
| Approved revision: | 161 |
| Merged at revision: | 154 |
| Proposed branch: | lp:~mikemc/ubuntuone-storage-protocol/fix-1025950-cert-locs |
| Merge into: | lp:ubuntuone-storage-protocol |
| Prerequisite: | lp:~mikemc/ubuntuone-storage-protocol/fix-run-tests |
| Diff against target: |
146 lines (+73/-23) 3 files modified
setup.py (+2/-2) tests/test_context.py (+44/-0) ubuntuone/storageprotocol/context.py (+27/-21) |
| To merge this branch: | bzr merge lp:~mikemc/ubuntuone-storage-protocol/fix-1025950-cert-locs |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Alejandro J. Cura (community) | 2012-08-07 | Approve on 2012-08-16 | |
| dobey (community) | Approve on 2012-08-15 | ||
|
Review via email:
|
|||
Commit Message
- Add support for finding SSL certs in packaged mac app. (LP: #1025950)
Description of the Change
- Add support for finding SSL certs in packaged mac app. (LP: #1025950)
This branch also adds tests for the ssl cert path finding code for windows and linux.
Tested on all three.
TO TEST:
1. run-tests or run-tests.bat
2. on darwin, use setup-mac.py to create a packaged mac app and run it from command line using something like this:
% U1_DEBUG=1 dist/ubuntuone-
Look for any errors regarding the certs path -- there should be none.
(Prior to this branch, you would see something about /etc/ssl/certs not existing)
- 157. By Mike McCracken on 2012-08-10
-
Remove env vars due to formerly broken buildout
- 158. By Mike McCracken on 2012-08-10
-
Add back SYSNAME so we skip cpp tests
- 159. By Mike McCracken on 2012-08-11
-
merge with branch
- 160. By Mike McCracken on 2012-08-11
-
simplify windows code using dirspec
| Mike McCracken (mikemc) wrote : | # |
> Instead of duplicating all this registry poking code, would it not be better
> here to use the load_config_
> already pokes at the registry to find the standard paths?
I looked into it and dirspec pokes differently, but apparently comes up with the same answer. So, I'm not sure why this code loops over keys like this.
I've updated it to use dirspec on win32.
- 161. By Mike McCracken on 2012-08-15
-
merge with fix-run-tests


153 + if sys.platform == "win32": ConnectRegistry (None, _winreg. HKEY_LOCAL_ MACHINE) OpenKey( hive, str( \Microsoft\ \Windows\ \CurrentVersion " QueryInfoKey( key)[1] ): EnumValue( key, i) storageprotocol ")
154 + # First open the registry hive
155 + hive = _winreg.
156 + # Open the registry key where Windows stores the Shell Folder locations
157 + key = _winreg.
158 + "Software\
159 + "\\Explorer\\Shell Folders"))
160 +
161 + ssl_cert_location = None
162 + for i in range(0, _winreg.
163 + name, value, val_type = _winreg.
164 + # Common AppData will always be present unless the user
165 + # played with regedit
166 + if name == "Common AppData":
167 + ssl_cert_location = os.path.join(value,
168 + "ubuntuone-
169 + break
Instead of duplicating all this registry poking code, would it not be better here to use the load_config_ paths() [0] value from dirspec.basedir, as it already pokes at the registry to find the standard paths?