使用python-blogger API时关闭gdata调试消息

时间:2013-03-21 10:28:11

标签: python gdata-api

我有following function初始化客户端。

import difflib
from gdata import service, GDataEntry
import atom
import sys
import time

"""Initializing instance and login into www.blogger.com"""
    def __init__(self, user, password):
        self.blogger_service = service.GDataService(user, password)
        self.blogger_service.source = 'gv-cl-blogger-updater-1.0'   # Client software name
        self.blogger_service.service = 'blogger'
        self.blogger_service.account_type = 'GOOGLE'
        self.blogger_service.server = 'www.blogger.com'
        self.blogger_service.ssl = True                             # Let's protect connection
        print "[I] Logging into " + self.blogger_service.server + " ..."
        self.blogger_service.ProgrammaticLogin()
        if self.blogger_service.current_token is None:
            print "[E] Unable to login into \"" + self.blogger_service.server + "\""

当我运行它时,它会显示在控制台上发送到服务器的代理信息。我有代理用户名和密码,它也显示在控制台上(此处删除)

[I] Logging into www.blogger.com ...
!!!!http://netmon.iitb.ac.in:80
!!!!Basic ZGlsYXdhcnM6Xmt1cnVja2NoZXRyYQ==

!!!!http://netmon.iitb.ac.in:80

是否有可以设置的标志,以便可以减少调试级别?我试过self.blogger_service.debug=False,但它没有改变任何东西。

0 个答案:

没有答案