def __init__(self, config): '''*config* can be obtained from the function :func:`cloudfusion.store.sugarsync.sugarsync_store.SugarsyncStore.get_config`, but you need to add user and password:: config = SugarsyncStore.get_config() config['user'] = '******' #your account username/e-mail address config['password'] = '******' #your account password Or you can use a configuration file that already has password and username set by specifying a path:: path_to_my_config_file = '/home/joe/MySugarsync.ini' config = get_config(path_to_my_config_file) :param config: dictionary with key value pairs''' #self.dir_listing_cache = {} self._logging_handler = 'sugarsync' self.logger = logging.getLogger(self._logging_handler) self.logger = db_logging_thread.make_logger_multiprocessingsave(self.logger) manager = Manager() self.path_cache = manager.dict() # use a lock for synchronized appends self._dir_listing_cache = manager.dict() self._dir_listing_cache_lock = RLock() self._last_partial_cache = manager.list() self._time_of_last_partial_cache = 0 #error handling for authorization error self.root = config["root"] try: self.client = SugarsyncClient(config) except Exception, e: raise StoreAutorizationError(repr(e), 0)