Some more things regarding #4269

This commit is contained in:
Miroslav Stampar
2020-07-16 16:10:02 +02:00
parent 6375f9e506
commit e910fc6b8b
7 changed files with 153 additions and 163 deletions

View File

@@ -570,7 +570,7 @@ class Route(object):
def prepare(self):
""" Do all on-demand work immediately (useful for debugging)."""
self.call
self.call()
def all_plugins(self):
""" Yield all Plugins affecting this route. """
@@ -1518,7 +1518,7 @@ class BaseRequest(object):
raise AttributeError("Attribute already defined: %s" % name)
self.environ[key] = value
def __delattr__(self, name, value):
def __delattr__(self, name):
try:
del self.environ['bottle.request.ext.%s' % name]
except KeyError:

View File

@@ -1930,7 +1930,7 @@ class ListControl(Control):
raise AttributeError("control '%s' is disabled" % self.name)
if self.readonly:
raise AttributeError("control '%s' is readonly" % self.name)
action == bool(action)
action = bool(action)
compat = self._form.backwards_compat
if not compat and item.disabled:
raise AttributeError("item is disabled")

View File

@@ -1271,16 +1271,6 @@ class CallgrindParser(LineParser):
return None
key, value = pair
return value
line = self.lookahead()
mo = self._key_re.match(line)
if not mo:
return None
key, value = line.split(':', 1)
if key not in keys:
return None
value = value.strip()
self.consume()
return key, value
def parse_keys(self, keys):
line = self.lookahead()

View File

@@ -722,7 +722,7 @@ class XDotAttrParser:
def handle_font_characteristics(self, flags):
# TODO
if flags != 0:
sys.stderr.write("warning: font characteristics not supported yet\n" % op)
sys.stderr.write("warning: font characteristics not supported yet\n")
def handle_text(self, x, y, j, w, t):
self.shapes.append(TextShape(self.pen, x, y, j, w, t))