Skip to content

Commit b002e37

Browse files
committed
flake8 fixes
1 parent 77980d0 commit b002e37

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

py/mockbuild/mounts.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def umount(self, force=False, nowarn=False):
6161
cmd = ['/bin/umount', '-n', '-l', self.path]
6262
try:
6363
util.do(cmd)
64-
except exception.Error as e:
64+
except exception.Error:
6565
return False
6666
self.mounted = False
6767
return True
@@ -90,7 +90,7 @@ def umount(self):
9090
cmd = ['/bin/umount', '-n', self.bindpath]
9191
try:
9292
util.do(cmd)
93-
except exception.Error as e:
93+
except exception.Error:
9494
return False
9595
self.mounted = False
9696
return True

py/mockbuild/package_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ def initialize_config(self):
271271

272272
def builddep(self, *pkgs, **kwargs):
273273
try:
274-
out = super(Dnf, self).builddep(*pkgs, **kwargs)
274+
super(Dnf, self).builddep(*pkgs, **kwargs)
275275
except Error as e:
276276
for i, line in enumerate(e.msg.split('\n')):
277277
if 'no such command: builddep' in line.lower():

py/mockbuild/plugins/sign.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
# python library imports
77
from mockbuild.trace_decorator import traceLog, getLog
8-
from mockbuild.util import do, doshell, run
98
import glob
109
import os
1110
import subprocess

py/mockbuild/util.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import pwd
1515
import re
1616
import select
17-
import shutil
1817
import signal
1918
import subprocess
2019
import sys

scripts/test-cfgs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,17 @@ def check_mirrorlist(self, url):
7171
if len(lines) == 1 and lines[0].startswith(b'Bad arch'):
7272
return 0
7373
return len(lines)
74-
except urllib.error.URLError as e:
74+
except urllib.error.URLError:
7575
pass
7676
return 0
7777

7878
def check_baseurl(self, url):
7979
# print("checking baseurl at %s" % url)
8080
try:
8181
data = urllib.request.urlopen(url).readlines()
82-
except urllib.error.HTTPError as e:
82+
except urllib.error.HTTPError:
8383
return 0
84-
except urllib.error.URLError as e:
84+
except urllib.error.URLError:
8585
return 0
8686
return len(data)
8787

0 commit comments

Comments
 (0)