~dobey/ubuntuone-client/installer-not-panel

« back to all changes in this revision

Viewing changes to ubuntuone/platform/credentials/__init__.py

  • Committer: Tarmac
  • Author(s): Natalia B. Bidart
  • Date: 2012-02-25 00:35:39 UTC
  • mfrom: (1193.1.5 use-sso-qt)
  • Revision ID: tarmac-20120225003539-5a46s2jld28re67a
- Use the Qt SSO UI when doing credentials management (LP: #930716).
- Use consistently the U1_DEBUG env var to have DEUBG output.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
from twisted.internet import defer
31
31
 
 
32
from ubuntu_sso import UI_EXECUTABLE_QT
 
33
from ubuntu_sso.credentials import (
 
34
    HELP_TEXT_KEY,
 
35
    PING_URL_KEY,
 
36
    POLICY_URL_KEY,
 
37
    UI_EXECUTABLE_KEY,
 
38
    TC_URL_KEY,
 
39
)
 
40
 
32
41
from ubuntuone import clientdefs
33
42
from ubuntuone.logger import (
34
43
    basic_formatter,
51
60
Q_ = lambda string: gettext.dgettext(clientdefs.GETTEXT_PACKAGE, string)
52
61
APP_NAME = u"Ubuntu One"
53
62
TC_URL = u"https://one.ubuntu.com/terms/"
 
63
POLICY_URL = u"https://one.ubuntu.com/privacy/"
54
64
 
55
65
 
56
66
def platform_data():
62
72
    result = urllib.urlencode(result)
63
73
    return result
64
74
 
 
75
 
65
76
BASE_PING_URL = \
66
77
    u"https://one.ubuntu.com/oauth/sso-finished-so-get-tokens/{email}"
67
78
# the result of platform_data is given by urlencode, encoded with ascii
69
80
DESCRIPTION = Q_('Ubuntu One requires an Ubuntu Single Sign On (SSO) account. '
70
81
                 'This process will allow you to create a new account, '
71
82
                 'if you do not yet have one.')
 
83
UI_PARAMS = {
 
84
    HELP_TEXT_KEY: DESCRIPTION,
 
85
    PING_URL_KEY: PING_URL,
 
86
    POLICY_URL_KEY: POLICY_URL,
 
87
    TC_URL_KEY: TC_URL,
 
88
    UI_EXECUTABLE_KEY: UI_EXECUTABLE_QT,
 
89
}
72
90
 
73
91
 
74
92
class CredentialsError(Exception):