Merge lp:~nataliabidart/ubuntuone-control-panel/override-urls into lp:ubuntuone-control-panel

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 407
Merged at revision: 406
Proposed branch: lp:~nataliabidart/ubuntuone-control-panel/override-urls
Merge into: lp:ubuntuone-control-panel
Diff against target: 60 lines (+14/-5)
3 files modified
ubuntuone/controlpanel/__init__.py (+5/-1)
ubuntuone/controlpanel/backend.py (+8/-3)
ubuntuone/controlpanel/gui/__init__.py (+1/-1)
To merge this branch: bzr merge lp:~nataliabidart/ubuntuone-control-panel/override-urls
Reviewer Review Type Date Requested Status
Alejandro J. Cura (community) Approve
Review via email: mp+182496@code.launchpad.net

Commit message

- Allow Ubuntu One base url to be overridden using env var.

To post a comment you must log in.
Revision history for this message
Alejandro J. Cura (alecu) wrote :

Looks good. I like the fix for the trailing /, we should apply it to all our projects.

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

The attempt to merge lp:~nataliabidart/ubuntuone-control-panel/override-urls into lp:ubuntuone-control-panel failed. Below is the output from the failed tests.

*** Running DBus test suite ***

Traceback (most recent call last):
  File "/usr/bin/u1trial", line 40, in <module>
    main()
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 277, in main
    suite = test_runner.get_suite(options)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 173, in get_suite
    config['ignore-paths']))
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 157, in _collect_tests
    module_suite = self._load_unittest(filepath)
  File "/usr/lib/python2.7/dist-packages/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py", line 98, in _load_unittest
    module = __import__(modpath, None, None, [""])
  File "/mnt/tarmac/cache/ubuntuone-control-panel/trunk/ubuntuone/controlpanel/dbustests/__init__.py", line 28, in <module>
    from ubuntuone.controlpanel import dbus_service
  File "/mnt/tarmac/cache/ubuntuone-control-panel/trunk/ubuntuone/controlpanel/dbus_service.py", line 27, in <module>
    from ubuntuone.syncdaemon.interaction_interfaces import bool_str
ImportError: No module named syncdaemon.interaction_interfaces

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ubuntuone/controlpanel/__init__.py'
--- ubuntuone/controlpanel/__init__.py 2012-11-29 19:36:53 +0000
+++ ubuntuone/controlpanel/__init__.py 2013-08-27 23:44:10 +0000
@@ -24,9 +24,13 @@
2424
25"""25"""
2626
27import os
28
27# constants29# constants
28DBUS_BUS_NAME = "com.ubuntuone.controlpanel"30DBUS_BUS_NAME = "com.ubuntuone.controlpanel"
29DBUS_PREFERENCES_PATH = "/preferences"31DBUS_PREFERENCES_PATH = "/preferences"
30DBUS_PREFERENCES_IFACE = "com.ubuntuone.controlpanel.Preferences"32DBUS_PREFERENCES_IFACE = "com.ubuntuone.controlpanel.Preferences"
3133
32WEBSERVICE_BASE_URL = u"https://one.ubuntu.com/api/"34UBUNTUONE_BASE_URL = os.environ.get(
35 'UONE_BASE_URL', u'https://one.ubuntu.com').rstrip('/') + '/'
36WEBSERVICE_BASE_URL = UBUNTUONE_BASE_URL + u'api/'
3337
=== modified file 'ubuntuone/controlpanel/backend.py'
--- ubuntuone/controlpanel/backend.py 2013-02-22 19:54:41 +0000
+++ ubuntuone/controlpanel/backend.py 2013-08-27 23:44:10 +0000
@@ -28,7 +28,12 @@
28 DeferredLock)28 DeferredLock)
29from ubuntuone.platform.credentials import CredentialsManagementTool29from ubuntuone.platform.credentials import CredentialsManagementTool
3030
31from ubuntuone.controlpanel import sd_client, replication_client31from ubuntuone.controlpanel import (
32 UBUNTUONE_BASE_URL,
33 WEBSERVICE_BASE_URL,
34 replication_client,
35 sd_client,
36)
32from ubuntuone.controlpanel.logger import setup_logging, log_call37from ubuntuone.controlpanel.logger import setup_logging, log_call
33from ubuntuone.controlpanel.web_client import WebClient38from ubuntuone.controlpanel.web_client import WebClient
34from ubuntu_sso.utils.webclient.common import (39from ubuntu_sso.utils.webclient.common import (
@@ -73,8 +78,8 @@
7378
74CONTACTS_PKG = 'thunderbird-couchdb'79CONTACTS_PKG = 'thunderbird-couchdb'
7580
76UBUNTUONE_FROM_OAUTH = u'https://one.ubuntu.com/api/1.0/from_oauth/'81UBUNTUONE_FROM_OAUTH = WEBSERVICE_BASE_URL + u'1.0/from_oauth/'
77UBUNTUONE_LINK = u'https://one.ubuntu.com/'82UBUNTUONE_LINK = UBUNTUONE_BASE_URL
7883
7984
80def append_path_sep(path):85def append_path_sep(path):
8186
=== modified file 'ubuntuone/controlpanel/gui/__init__.py'
--- ubuntuone/controlpanel/gui/__init__.py 2013-06-12 14:32:34 +0000
+++ ubuntuone/controlpanel/gui/__init__.py 2013-08-27 23:44:10 +0000
@@ -70,7 +70,7 @@
7070
71FILE_URI_PREFIX = u'file://'71FILE_URI_PREFIX = u'file://'
7272
73ACCEPT_SHARES = 'https://one.ubuntu.com/files/shareoffer/%s/'73ACCEPT_SHARES = UBUNTUONE_LINK + u'files/shareoffer/%s/'
74CONTACTS_LINK = UBUNTUONE_LINK74CONTACTS_LINK = UBUNTUONE_LINK
75DASHBOARD = UBUNTUONE_LINK + u'dashboard/'75DASHBOARD = UBUNTUONE_LINK + u'dashboard/'
76EDIT_ACCOUNT_LINK = UBUNTUONE_LINK + u'account/'76EDIT_ACCOUNT_LINK = UBUNTUONE_LINK + u'account/'

Subscribers

People subscribed via source and target branches