~facundo/ubuntuone-client/fix-svfilenew-conflict

« back to all changes in this revision

Viewing changes to bin/ubuntuone-launch

  • Committer: Facundo Batista
  • Date: 2011-04-04 12:31:43 UTC
  • mfrom: (922.1.9 ubuntuone-client)
  • Revision ID: facundo@taniquetil.com.ar-20110404123143-mobua5abcpinz0o2
TrunkĀ mergedĀ in

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python
2
2
 
3
 
# ubuntuone-start - Ubuntu One storage synchronization daemon startup helper
 
3
# ubuntuone-launch - Ubuntu One storage synchronization daemon startup helper
4
4
#
5
5
# Author: John Lenton <john.lenton@canonical.com>
6
6
#
53
53
import glib
54
54
import gobject
55
55
from dbus.mainloop.glib import DBusGMainLoop
 
56
from ubuntuone.platform.credentials import CredentialsManagementTool
56
57
from ubuntuone.platform.tools import SyncDaemonTool, is_running
57
 
from ubuntuone.clientdefs import APP_NAME as SD_APP_NAME
58
 
from ubuntu_sso.main import SSOCredentials
59
58
from twisted.internet import defer
60
59
 
61
60
 
68
67
    else:
69
68
        # one last check: avoid having sso pop up asking for creds if
70
69
        # the user deleted them
 
70
        creds_tools = CredentialsManagementTool()
 
71
        d = creds_tools.find_credentials()
71
72
 
72
 
        # XXX: that this works with None is probably excessive
73
 
        # chumminess with the implementation
74
 
        creds = SSOCredentials(None)
75
 
        if creds.find_credentials(SD_APP_NAME):
76
 
            d = sync_daemon_tool.connect()
77
 
        else:
78
 
            d = defer.fail(RuntimeError("no creds"))
79
73
    return d
80
74
 
81
75