Merge "fixes some problems pyflakes complains about"
This commit is contained in:
@@ -20,7 +20,7 @@ from swift.common.swob import Request, HTTPBadGateway, \
|
|||||||
HTTPCreated, HTTPBadRequest, HTTPNotFound, HTTPUnauthorized, HTTPOk, \
|
HTTPCreated, HTTPBadRequest, HTTPNotFound, HTTPUnauthorized, HTTPOk, \
|
||||||
HTTPPreconditionFailed, HTTPRequestEntityTooLarge, HTTPNotAcceptable, \
|
HTTPPreconditionFailed, HTTPRequestEntityTooLarge, HTTPNotAcceptable, \
|
||||||
HTTPLengthRequired, wsgify
|
HTTPLengthRequired, wsgify
|
||||||
from swift.common.utils import json, TRUE_VALUES
|
from swift.common.utils import json
|
||||||
from swift.common.constraints import check_utf8, MAX_FILE_SIZE
|
from swift.common.constraints import check_utf8, MAX_FILE_SIZE
|
||||||
from swift.common.http import HTTP_BAD_REQUEST, HTTP_UNAUTHORIZED, \
|
from swift.common.http import HTTP_BAD_REQUEST, HTTP_UNAUTHORIZED, \
|
||||||
HTTP_NOT_FOUND
|
HTTP_NOT_FOUND
|
||||||
|
@@ -106,12 +106,11 @@ import re
|
|||||||
import rfc822
|
import rfc822
|
||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from time import gmtime, strftime, time
|
from time import time
|
||||||
from urllib import quote, unquote
|
from urllib import quote
|
||||||
|
|
||||||
from swift.common.utils import streq_const_time
|
from swift.common.utils import streq_const_time
|
||||||
from swift.common.wsgi import make_pre_authed_env
|
from swift.common.wsgi import make_pre_authed_env
|
||||||
from swift.common.http import HTTP_BAD_REQUEST
|
|
||||||
|
|
||||||
|
|
||||||
#: The size of data to read from the form at any given time.
|
#: The size of data to read from the form at any given time.
|
||||||
|
@@ -104,7 +104,7 @@ Example usage of this middleware via ``swift``:
|
|||||||
|
|
||||||
import cgi
|
import cgi
|
||||||
import time
|
import time
|
||||||
from urllib import unquote, quote as urllib_quote
|
from urllib import quote as urllib_quote
|
||||||
|
|
||||||
|
|
||||||
from swift.common.utils import cache_from_env, human_readable, split_path, \
|
from swift.common.utils import cache_from_env, human_readable, split_path, \
|
||||||
|
@@ -13,9 +13,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from time import gmtime, strftime, time
|
from time import time
|
||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
from urllib import quote, unquote
|
from urllib import unquote
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
import hmac
|
import hmac
|
||||||
@@ -29,7 +29,6 @@ from swift.common.swob import HTTPBadRequest, HTTPForbidden, HTTPNotFound, \
|
|||||||
from swift.common.middleware.acl import clean_acl, parse_acl, referrer_allowed
|
from swift.common.middleware.acl import clean_acl, parse_acl, referrer_allowed
|
||||||
from swift.common.utils import cache_from_env, get_logger, \
|
from swift.common.utils import cache_from_env, get_logger, \
|
||||||
split_path, config_true_value
|
split_path, config_true_value
|
||||||
from swift.common.http import HTTP_CLIENT_CLOSED_REQUEST
|
|
||||||
|
|
||||||
|
|
||||||
class TempAuth(object):
|
class TempAuth(object):
|
||||||
|
@@ -92,12 +92,11 @@ import hmac
|
|||||||
from hashlib import sha1
|
from hashlib import sha1
|
||||||
from os.path import basename
|
from os.path import basename
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
from time import gmtime, strftime, time
|
from time import time
|
||||||
from urllib import unquote, urlencode
|
from urllib import urlencode
|
||||||
from urlparse import parse_qs
|
from urlparse import parse_qs
|
||||||
|
|
||||||
from swift.common.wsgi import make_pre_authed_env
|
from swift.common.wsgi import make_pre_authed_env
|
||||||
from swift.common.http import HTTP_UNAUTHORIZED
|
|
||||||
|
|
||||||
|
|
||||||
#: Default headers to remove from incoming requests. Simply a whitespace
|
#: Default headers to remove from incoming requests. Simply a whitespace
|
||||||
|
Reference in New Issue
Block a user