Exemple #1
0
    def __get_client(self):
        '''Login to Google and return a ContactsClient object.

        '''
        if not self.__client:
            if not self.config.email or not self.password:
                print >> sys.stderr, "ERROR: Missing email or password"
                sys.exit(1)
            client = ContactsClient()
            client.ssl = True
            client.ClientLogin(email=self.config.email,
                               password=self.password,
                               service='cp',
                               source='goobook')
            self.__client = client
        return self.__client