]> git.mxchange.org Git - quix0rs-apt-p2p.git/commitdiff
made user agent string a variable
authorburris <burris>
Tue, 3 Sep 2002 08:22:22 +0000 (08:22 +0000)
committerburris <burris>
Tue, 3 Sep 2002 08:22:22 +0000 (08:22 +0000)
xmlrpcclient.py

index 866039f991e61639ce69939cb06ad62806c70450..230f3ad56762169eae6caa1f2955201fd22d4e70 100644 (file)
@@ -4,11 +4,12 @@ from twisted.internet.defer import Deferred
 
 from xmlrpclib import loads, dumps
 
+USER_AGENT = 'Python/Twisted XMLRPC 0.1'
 class XMLRPCClient(HTTPClient):
     def connectionMade(self):
        payload = dumps(self.args, self.method)
        self.sendCommand('POST', '/RPC2')
-       self.sendHeader('User-Agent', 'Python/Twisted XMLRPC 0.1')
+       self.sendHeader('User-Agent', USER_AGENT)
        self.sendHeader('Content-Type', 'text/xml')
        self.sendHeader('Content-Length', len(payload))
        self.endHeaders()