mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-19 23:20:57 +01:00
whitespace and a forgotten conf import
This commit is contained in:
parent
093aa40335
commit
8282d3e847
@ -34,6 +34,7 @@ __revision__ = "$Id$"
|
|||||||
import fix
|
import fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import conf
|
||||||
import socket
|
import socket
|
||||||
import urllib2
|
import urllib2
|
||||||
import urlparse
|
import urlparse
|
||||||
@ -66,7 +67,7 @@ def strError(e):
|
|||||||
return FORBIDDEN
|
return FORBIDDEN
|
||||||
else:
|
else:
|
||||||
return str(e)
|
return str(e)
|
||||||
|
|
||||||
def getUrlFd(url):
|
def getUrlFd(url):
|
||||||
"""Gets a file-like object for a url."""
|
"""Gets a file-like object for a url."""
|
||||||
try:
|
try:
|
||||||
@ -84,7 +85,7 @@ def getUrlFd(url):
|
|||||||
raise WebError, strError(e)
|
raise WebError, strError(e)
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
raise WebError, strError(e)
|
raise WebError, strError(e)
|
||||||
|
|
||||||
def getUrl(url, size=None):
|
def getUrl(url, size=None):
|
||||||
"""Gets a page. Returns a string that is the page gotten."""
|
"""Gets a page. Returns a string that is the page gotten."""
|
||||||
fd = getUrlFd(url)
|
fd = getUrlFd(url)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user