Merge lp:~mikemc/ubuntuone-client/darwin-platform-platform into lp:ubuntuone-client

Proposed by Mike McCracken on 2012-09-25
Status: Merged
Approved by: dobey on 2012-09-26
Approved revision: 1322
Merged at revision: 1323
Proposed branch: lp:~mikemc/ubuntuone-client/darwin-platform-platform
Merge into: lp:ubuntuone-client
Diff against target: 18 lines (+4/-3)
1 file modified
ubuntuone/platform/__init__.py (+4/-3)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-client/darwin-platform-platform
Reviewer Review Type Date Requested Status
Roberto Alsina (community) 2012-09-25 Approve on 2012-09-26
Review via email: mp+126345@code.launchpad.net

Commit Message

- Send 'darwin' to server as platform name in auth. (LP: #1037435)

Description of the Change

- Send 'darwin' to server as platform name in auth. (LP: #1037435)

per verterok on irc, I can make this string whatever I want and the server metrics will do the right thing:

mmcc: verterok: okay, great. just wanted to check that I won't break anything on that end that expects only those two strings
mmcc: I'll make it send 'darwin'.
verterok: mmcc: we don't use sys.platform because of the linux/linux2 difference
verterok: mmcc: yes, it shouldn't break anything
verterok: mmcc: the only code that uses that info is this: https://pastebin.canonical.com/75285/

To test on darwin, run-mac-tests on tests/platform. the rest of the whole test suite is still kind of broken.

To post a comment you must log in.
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/platform/__init__.py'
2--- ubuntuone/platform/__init__.py 2012-08-06 19:18:57 +0000
3+++ ubuntuone/platform/__init__.py 2012-09-25 22:57:25 +0000
4@@ -33,11 +33,12 @@
5
6 from dirspec.utils import user_home
7
8-# very hackish way to avoid "import *" to satisfy pyflakes
9-# and to avoid import ubuntuone.platform.X as source (it wont work)
10-
11+# define a platform string separate from sys.platform to be sent to
12+# the server for metrics in ActionQueue.authenticate().
13 if sys.platform == "win32":
14 platform = "win32"
15+elif sys.platform == "darwin":
16+ platform = "darwin"
17 else:
18 platform = "linux"
19

Subscribers

People subscribed via source and target branches