~ubuntu-branches/ubuntu/lucid/ubuntuone-client/lucid-proposed

« back to all changes in this revision

Viewing changes to ubuntuone/oauthdesktop/main.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodney Dawes
  • Date: 2009-09-28 18:15:00 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20090928181500-jz7i72znd1nwap4r
Tags: 1.0.0-0ubuntu1
* New upstream release.
  - Limit log messages, file size, and rotate more often (LP: #435137)
  - Rotate oauth-login.log and cap the file size (LP: #445514)
  - Remove pycurl usage in favor of urllib and better errors (LP: #411029)
  - Save the syncdaemon settings for bw limiting (LP: #418882)
  - Fix NoSuchDatabase when pairing desktopcouch (LP: #438411)
  - Fix IOError when launching preferences window (LP: #441039)
  - Update icons to remove Ubuntu logo, better names (LP: #434886)
  - Use ngettext for the possibly singular notification (LP: #449269)
  - Only create Places bookmark when first authorizing (LP: #397749)
  - Don't always recreate the bookmark (LP: #401211)
  - Handle showing emblems better (LP: #440839)
  - Remove the System->Preferences menu item (LP: #443342)
  - Remove NotOnlineError usage (LP: #404550)
  - Set a default share name in the Nautilus sharing UI (LP: #369488)
  - Simplify some state handling (LP: #420354)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from twisted.internet.threads import deferToThread
35
35
 
36
36
from ubuntuone.oauthdesktop.logger import setupLogging
37
 
setupLogging()
38
 
import logging
39
 
logger = logging.getLogger("UbuntuOne.OAuthDesktop.main")
 
37
logger = setupLogging("UbuntuOne.OAuthDesktop.main")
40
38
 
41
39
DBusGMainLoop(set_as_default=True)
42
40
 
117
115
        """Deal with errors returned from auth process"""
118
116
        logger.debug("Error returned from auth process")
119
117
        self.dbus_object.currently_authing = False # don't block future requests
120
 
        from ubuntuone.oauthdesktop.auth import (
121
 
           ConsumerKeyInvalid, UnknownLoginError, NotOnlineError)
122
 
        r = failure.trap(ConsumerKeyInvalid, UnknownLoginError, NotOnlineError)
123
 
        logger.debug("Error was: %s", r)
124
 
        if self.use_libnotify and pynotify:
125
 
            if r == ConsumerKeyInvalid:
126
 
                pynotify.Notification("UbuntuOne",
127
 
              "This application is not allowed to " +\
128
 
              "connect to one.ubuntu.com").show()
129
 
            elif r == UnknownLoginError:
130
 
                pynotify.Notification("UbuntuOne",
131
 
                  "There was a problem connecting to one.ubuntu.com").show()
132
118
 
133
119
    def get_config_urls(self, realm):
134
120
        """Look up the URLs to use in the config file"""