New submission from Luís Antônio Araújo de Brito <[email protected]>:
Hi folks,
I have an app that talk with cPanel for create/suspend/unsuspend/kill
domaind.. So when I use the urllib2 to get response for cPanel and read it. It
show the IncompleteRead except.
I get the same URL in a browser and the response is ok. With lib it's
broked.
The Code Sample
------------------
auth = "WHM my_user:%s" % "HASHHASHHASHHASH"
_opener = urllib2.build_opener()
_opener.addheaders = [('Authorization', auth)]
url = "http://my_cpanel_url/scripts/remote_suspend?user=%s" %
"user_on_cpanel_name"
try:
f = _opener.open(url)
except urllib2.HTTPError, e:
raise OperationError(e)
result = f.read() # <-- IncompleteRead except HERE
f.close()
print result.strip()
-----------------
----------
messages: 130540
nosy: caitifbrito
priority: normal
severity: normal
status: open
title: IncompleteRead: IncompleteRead(168 bytes read)
type: resource usage
versions: Python 2.6
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11463>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com