~ubuntu-branches/ubuntu/oneiric/ubuntuone-client/oneiric

« back to all changes in this revision

Viewing changes to ubuntuone/u1sync/client.py

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Moya
  • Date: 2010-06-23 23:08:15 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20100623230815-4m3ugh10u9x9xzw5
Tags: upstream-1.3.2
ImportĀ upstreamĀ versionĀ 1.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
from twisted.internet import reactor, defer
36
36
from twisted.internet.defer import inlineCallbacks, returnValue
 
37
from ubuntuone.logger import LOGFOLDER
37
38
from ubuntuone.storageprotocol.content_hash import crc32
38
39
from ubuntuone.storageprotocol.context import get_ssl_context
39
 
from ubuntuone.oauthdesktop.config import get_config \
40
 
                                                 as get_oauth_config
41
 
from ubuntuone.oauthdesktop.auth import AuthorisationClient
 
40
from ubuntu_sso.config import get_config as get_oauth_config
 
41
from ubuntu_sso.auth import AuthorisationClient
42
42
from ubuntuone.u1sync.genericmerge import MergeNode
43
43
from ubuntuone.u1sync.utils import should_sync
44
44
 
53
53
import uuid
54
54
import logging
55
55
from logging.handlers import RotatingFileHandler
56
 
import xdg.BaseDirectory
57
56
import time
58
57
 
59
58
def share_str(share_uuid):
60
59
    """Converts a share UUID to a form the protocol likes."""
61
60
    return str(share_uuid) if share_uuid is not None else request.ROOT
62
61
 
63
 
log_home = xdg.BaseDirectory.xdg_cache_home
64
 
LOGFOLDER = os.path.join(log_home, 'ubuntuone','log')
65
62
LOGFILENAME = os.path.join(LOGFOLDER, 'u1sync.log')
66
63
u1_logger = logging.getLogger("u1sync.timing.log")
67
64
handler = RotatingFileHandler(LOGFILENAME)