aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorKagami Sascha Rosylight <saschanaz@outlook.com>2020-06-21 03:34:22 +0200
committerKagami Sascha Rosylight <saschanaz@outlook.com>2020-06-21 03:34:32 +0200
commitd01648d637a350af0cb81470f956cc5edd18a9a4 (patch)
tree348d75fe9d3e63fd4bb8ff2506db6606a12e56fd /python/servo/bootstrap_commands.py
parentc953931621679f37fa31a1dc5f00ebb9f0c204e0 (diff)
downloadservo-d01648d637a350af0cb81470f956cc5edd18a9a4.tar.gz
servo-d01648d637a350af0cb81470f956cc5edd18a9a4.zip
Fix remaining flake8 warnings
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index b8a88314609..684dfc41dbe 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -244,7 +244,7 @@ class MachCommands(CommandBase):
with open(path.join(preload_path, preload_filename), 'w') as fd:
json.dump(entries, fd, indent=4)
- except ValueError as e:
+ except ValueError:
print("Unable to parse chromium HSTS preload list, has the format changed?")
sys.exit(1)
@@ -262,8 +262,8 @@ class MachCommands(CommandBase):
print("Unable to download the public suffix list; are you connected to the internet?")
sys.exit(1)
- lines = [l.strip() for l in content.decode("utf8").split("\n")]
- suffixes = [l for l in lines if not l.startswith("//") and not l == ""]
+ lines = [line.strip() for line in content.decode("utf8").split("\n")]
+ suffixes = [line for line in lines if not line.startswith("//") and not line == ""]
with open(dst_filename, "wb") as fo:
for suffix in suffixes:
@@ -475,7 +475,7 @@ class MachCommands(CommandBase):
if os.path.exists(crate_path):
try:
delete(crate_path)
- except:
+ except (FileNotFoundError, PermissionError):
print(traceback.format_exc())
print("Delete %s failed!" % crate_path)
else: