Merge lp:~thisfred/ubuntuone-client/fix-linux-detection into lp:ubuntuone-client

Proposed by Eric Casteleijn
Status: Merged
Approved by: Eric Casteleijn
Approved revision: 1029
Merged at revision: 1028
Proposed branch: lp:~thisfred/ubuntuone-client/fix-linux-detection
Merge into: lp:ubuntuone-client
Diff against target: 121 lines (+17/-17)
7 files modified
tests/platform/__init__.py (+10/-10)
tests/platform/linux/eventlog/test_zg_listener.py (+1/-1)
tests/platform/linux/test_dbus.py (+1/-1)
tests/platform/linux/test_filesystem_notifications.py (+1/-1)
tests/platform/test_platform.py (+2/-2)
ubuntuone/platform/linux/__init__.py (+1/-1)
ubuntuone/platform/linux/vm_helper.py (+1/-1)
To merge this branch: bzr merge lp:~thisfred/ubuntuone-client/fix-linux-detection
Reviewer Review Type Date Requested Status
Natalia Bidart (community) Approve
Review via email: mp+66208@code.launchpad.net

Commit message

* Fixes linux detection (LP: #803062)

Description of the change

* Fixes linux detection (LP: #803062)

To post a comment you must log in.
Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/platform/__init__.py'
2--- tests/platform/__init__.py 2011-02-15 11:31:40 +0000
3+++ tests/platform/__init__.py 2011-06-28 21:29:30 +0000
4@@ -3,29 +3,29 @@
5
6 setup_action_queue_test = None
7 setup_main_test = None
8-get_main_params = None
9+get_main_params = None
10 _GeneralINotifyProcessor = None
11 platform_mangled_path = None
12 IPCTestCase = None
13
14-if sys.platform == 'linux2':
15+if sys.platform.startswith('linux'):
16 from tests.platform import linux as linux_test
17- setup_action_queue_test = linux_test.setup_action_queue_test
18- setup_main_test = linux_test.setup_main_test
19+ setup_action_queue_test = linux_test.setup_action_queue_test
20+ setup_main_test = linux_test.setup_main_test
21 get_main_params = linux_test.get_main_params
22- platform_mangled_path = linux_test.platform_mangled_path
23+ platform_mangled_path = linux_test.platform_mangled_path
24 from ubuntuone.platform.linux import filesystem_notifications
25 _GeneralINotifyProcessor = filesystem_notifications._GeneralINotifyProcessor
26 from tests.platform.linux.test_dbus import DBusTwistedTestCase
27 IPCTestCase = DBusTwistedTestCase
28 else:
29 from tests.platform import windows as windows_test
30- setup_action_queue_test = windows_test.setup_action_queue_test
31- setup_main_test = windows_test.setup_main_test
32- get_main_params = windows_test.get_main_params
33- platform_mangled_path = windows_test.platform_mangled_path
34+ setup_action_queue_test = windows_test.setup_action_queue_test
35+ setup_main_test = windows_test.setup_main_test
36+ get_main_params = windows_test.get_main_params
37+ platform_mangled_path = windows_test.platform_mangled_path
38 from ubuntuone.platform.windows import filesystem_notifications
39- _GeneralINotifyProcessor = filesystem_notifications.NotifyProcessor
40+ _GeneralINotifyProcessor = filesystem_notifications.NotifyProcessor
41 from tests.platform.windows.test_ipc import PerspectiveBrokerTestCase
42 IPCTestCase = PerspectiveBrokerTestCase
43
44
45=== modified file 'tests/platform/linux/eventlog/test_zg_listener.py'
46--- tests/platform/linux/eventlog/test_zg_listener.py 2011-06-15 19:05:22 +0000
47+++ tests/platform/linux/eventlog/test_zg_listener.py 2011-06-28 21:29:30 +0000
48@@ -1223,7 +1223,7 @@
49 def test_suite():
50 """Collect these tests only on linux."""
51 import sys
52- if sys.platform == 'linux2':
53+ if sys.platform.startswith('linux'):
54 tests = unittest.TestLoader().loadTestsFromName(__name__)
55 else:
56 tests = []
57
58=== modified file 'tests/platform/linux/test_dbus.py'
59--- tests/platform/linux/test_dbus.py 2011-06-16 20:42:09 +0000
60+++ tests/platform/linux/test_dbus.py 2011-06-28 21:29:30 +0000
61@@ -3982,7 +3982,7 @@
62 def test_suite():
63 """Collect these tests only on linux."""
64 import sys
65- if sys.platform == 'linux2':
66+ if sys.platform.startswith('linux'):
67 tests = unittest.TestLoader().loadTestsFromName(__name__)
68 else:
69 tests = []
70
71=== modified file 'tests/platform/linux/test_filesystem_notifications.py'
72--- tests/platform/linux/test_filesystem_notifications.py 2011-02-21 17:29:02 +0000
73+++ tests/platform/linux/test_filesystem_notifications.py 2011-06-28 21:29:30 +0000
74@@ -404,7 +404,7 @@
75 def test_suite():
76 """Collect the tests."""
77 import sys
78- if sys.platform == 'linux2':
79+ if sys.platform.startswith('linux'):
80 tests = unittest.TestLoader().loadTestsFromName(__name__)
81 else:
82 tests = []
83
84=== modified file 'tests/platform/test_platform.py'
85--- tests/platform/test_platform.py 2010-11-29 20:21:45 +0000
86+++ tests/platform/test_platform.py 2011-06-28 21:29:30 +0000
87@@ -7,6 +7,6 @@
88
89 def test_import(self):
90 """Make sure we can import the platform module."""
91-
92+
93 import ubuntuone.platform as uplt
94- self.assertEqual(uplt.platform, sys.platform)
95+ self.assertTrue(sys.platform.startswith(uplt.platform))
96
97=== modified file 'ubuntuone/platform/linux/__init__.py'
98--- ubuntuone/platform/linux/__init__.py 2011-06-16 14:30:29 +0000
99+++ ubuntuone/platform/linux/__init__.py 2011-06-28 21:29:30 +0000
100@@ -20,7 +20,7 @@
101 This module has to have all linux specific modules and provide the api required
102 to support the linux platform."""
103
104-platform = "linux2"
105+platform = "linux"
106
107 import dbus
108 from dbus.mainloop.glib import DBusGMainLoop
109
110=== modified file 'ubuntuone/platform/linux/vm_helper.py'
111--- ubuntuone/platform/linux/vm_helper.py 2011-06-16 14:30:29 +0000
112+++ ubuntuone/platform/linux/vm_helper.py 2011-06-28 21:29:30 +0000
113@@ -19,7 +19,7 @@
114 import os
115
116
117-platform = "linux2"
118+platform = "linux"
119
120
121 def create_shares_link(source, dest):

Subscribers

People subscribed via source and target branches