Commit 38acd4c0 authored by Raymond Hettinger's avatar Raymond Hettinger

Issue 21469: Minor code modernization (convert and/or expression to an if/else expression).

Suggested by: Tal Einat
parent 51669d8c
......@@ -172,7 +172,7 @@ class RuleLine:
return self.path == "*" or filename.startswith(self.path)
def __str__(self):
return (self.allowance and "Allow" or "Disallow") + ": " + self.path
return ("Allow" if self.allowance else "Disallow") + ": " + self.path
class Entry:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment