[Trivial fix]Remove unnecessary slash
This is to remove the unncessary slash when the line doesn't exceed the length of 79, to make the code more readable. Change-Id: I31070067913560d6147f95d0fdfba4f9f9ce0936
This commit is contained in:
parent
fd73353bb1
commit
6d63297f02
swift
cli
common
proxy
@ -169,8 +169,7 @@ class SwiftRecon(object):
|
||||
ret_dict = {'low': min(cstats), 'high': max(cstats),
|
||||
'total': sum(cstats), 'reported': len(cstats),
|
||||
'number_none': len(stats) - len(cstats), 'name': name}
|
||||
ret_dict['average'] = \
|
||||
ret_dict['total'] / float(len(cstats))
|
||||
ret_dict['average'] = ret_dict['total'] / float(len(cstats))
|
||||
ret_dict['perc_none'] = \
|
||||
ret_dict['number_none'] * 100.0 / len(stats)
|
||||
else:
|
||||
|
@ -383,8 +383,7 @@ class FormPost(object):
|
||||
subenv['CONTENT_TYPE'] = \
|
||||
attributes['content-type'] or 'application/octet-stream'
|
||||
if 'content-encoding' in attributes:
|
||||
subenv['HTTP_CONTENT_ENCODING'] = \
|
||||
attributes['content-encoding']
|
||||
subenv['HTTP_CONTENT_ENCODING'] = attributes['content-encoding']
|
||||
try:
|
||||
if int(attributes.get('expires') or 0) < time():
|
||||
raise FormUnauthorized('form expired')
|
||||
|
@ -324,8 +324,7 @@ def filter_factory(global_conf, **local_conf):
|
||||
conf.update(local_conf)
|
||||
|
||||
account_ratelimit = float(conf.get('account_ratelimit', 0))
|
||||
max_sleep_time_seconds = \
|
||||
float(conf.get('max_sleep_time_seconds', 60))
|
||||
max_sleep_time_seconds = float(conf.get('max_sleep_time_seconds', 60))
|
||||
container_ratelimits, cont_limit_info = interpret_conf_limits(
|
||||
conf, 'container_ratelimit_', info=1)
|
||||
container_listing_ratelimits, cont_list_limit_info = \
|
||||
|
@ -226,8 +226,7 @@ class UploadsController(Controller):
|
||||
:return (non_delimited_uploads, common_prefixes)
|
||||
"""
|
||||
if six.PY2:
|
||||
(prefix, delimiter) = \
|
||||
utf8encode(prefix, delimiter)
|
||||
(prefix, delimiter) = utf8encode(prefix, delimiter)
|
||||
non_delimited_uploads = []
|
||||
common_prefixes = set()
|
||||
for upload in uploads:
|
||||
@ -288,8 +287,7 @@ class UploadsController(Controller):
|
||||
if 'delimiter' in req.params:
|
||||
prefix = req.params.get('prefix', '')
|
||||
delimiter = req.params['delimiter']
|
||||
uploads, prefixes = \
|
||||
separate_uploads(uploads, prefix, delimiter)
|
||||
uploads, prefixes = separate_uploads(uploads, prefix, delimiter)
|
||||
|
||||
if len(uploads) > maxuploads:
|
||||
uploads = uploads[:maxuploads]
|
||||
@ -310,8 +308,7 @@ class UploadsController(Controller):
|
||||
SubElement(result_elem, 'NextKeyMarker').text = nextkeymarker
|
||||
SubElement(result_elem, 'NextUploadIdMarker').text = nextuploadmarker
|
||||
if 'delimiter' in req.params:
|
||||
SubElement(result_elem, 'Delimiter').text = \
|
||||
req.params['delimiter']
|
||||
SubElement(result_elem, 'Delimiter').text = req.params['delimiter']
|
||||
if 'prefix' in req.params:
|
||||
SubElement(result_elem, 'Prefix').text = req.params['prefix']
|
||||
SubElement(result_elem, 'MaxUploads').text = str(maxuploads)
|
||||
|
@ -323,8 +323,7 @@ class HTMLViewer(object):
|
||||
if not fulldirs:
|
||||
stats.strip_dirs()
|
||||
stats.sort_stats(sort)
|
||||
nfl_filter_esc =\
|
||||
nfl_filter.replace('(', '\(').replace(')', '\)')
|
||||
nfl_filter_esc = nfl_filter.replace('(', '\(').replace(')', '\)')
|
||||
amount = [nfl_filter_esc, limit] if nfl_filter_esc else [limit]
|
||||
profile_html = self.generate_stats_html(stats, self.app_path,
|
||||
profile_id, *amount)
|
||||
|
@ -1036,8 +1036,7 @@ def fallocate(fd, size, offset=0):
|
||||
st = os.fstatvfs(fd)
|
||||
free = st.f_frsize * st.f_bavail - size
|
||||
if FALLOCATE_IS_PERCENT:
|
||||
free = \
|
||||
(float(free) / float(st.f_frsize * st.f_blocks)) * 100
|
||||
free = (float(free) / float(st.f_frsize * st.f_blocks)) * 100
|
||||
if float(free) <= float(FALLOCATE_RESERVE):
|
||||
raise OSError(
|
||||
errno.ENOSPC,
|
||||
|
@ -395,8 +395,7 @@ def get_account_info(env, app, swift_source=None):
|
||||
|
||||
:raises ValueError: when path doesn't contain an account
|
||||
"""
|
||||
(version, account, _junk, _junk) = \
|
||||
split_path(env['PATH_INFO'], 2, 4, True)
|
||||
(version, account, _junk, _junk) = split_path(env['PATH_INFO'], 2, 4, True)
|
||||
|
||||
# Check in environment cache and in memcache (in that order)
|
||||
info = _get_info_from_caches(app, env, account)
|
||||
@ -1376,8 +1375,7 @@ class GetOrHeadHandler(ResumingGetter):
|
||||
res.swift_conn = source.swift_conn
|
||||
if not res.environ:
|
||||
res.environ = {}
|
||||
res.environ['swift_x_timestamp'] = \
|
||||
source.getheader('x-timestamp')
|
||||
res.environ['swift_x_timestamp'] = source.getheader('x-timestamp')
|
||||
res.accept_ranges = 'bytes'
|
||||
res.content_length = source.getheader('Content-Length')
|
||||
if source.getheader('Content-Type'):
|
||||
|
@ -246,8 +246,7 @@ class Application(object):
|
||||
conf.get('strict_cors_mode', 't'))
|
||||
self.node_timings = {}
|
||||
self.timing_expiry = int(conf.get('timing_expiry', 300))
|
||||
self.concurrent_gets = \
|
||||
config_true_value(conf.get('concurrent_gets'))
|
||||
self.concurrent_gets = config_true_value(conf.get('concurrent_gets'))
|
||||
self.concurrency_timeout = float(conf.get('concurrency_timeout',
|
||||
self.conn_timeout))
|
||||
value = conf.get('request_node_count', '2 * replicas').lower().split()
|
||||
|
Loading…
x
Reference in New Issue
Block a user