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