double if statement (#707)

* Migrated `%` string formating

* double if statement

combined double 'if' to a single 'if' with 'and'

* Revert "Fix "Prefer `format()` over string interpolation operator" issue"
This commit is contained in:
Jeremy Zimmerman 2017-05-11 11:49:32 -07:00 committed by Eli Uriegas
parent 23ee9f64d4
commit f39512aa63

View File

@ -116,9 +116,8 @@ class Cookie(dict):
))
except AttributeError:
output.append('%s=%s' % (self._keys[key], value))
elif key in self._flags:
if self[key]:
output.append(self._keys[key])
elif key in self._flags and self[key]:
output.append(self._keys[key])
else:
output.append('%s=%s' % (self._keys[key], value))