Skip to content

Commit dd15d63

Browse files
committed
Fix Travis Builds
This patch fixes the Travis builds which were broken due to new Flake8 versions which complained about previously accepted code.
1 parent 9026316 commit dd15d63

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

feedgen/util.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ def ensure_format(val, allowed, required, allowed_values=None, defaults=None):
6464
return val
6565

6666

67-
def formatRFC2822(d):
67+
def formatRFC2822(date):
6868
'''Make sure the locale setting do not interfere with the time format.
6969
'''
70-
l = locale.setlocale(locale.LC_ALL)
70+
old = locale.setlocale(locale.LC_ALL)
7171
locale.setlocale(locale.LC_ALL, 'C')
72-
d = d.strftime('%a, %d %b %Y %H:%M:%S %z')
73-
locale.setlocale(locale.LC_ALL, l)
74-
return d
72+
date = date.strftime('%a, %d %b %Y %H:%M:%S %z')
73+
locale.setlocale(locale.LC_ALL, old)
74+
return date

tests/test_main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def test_feed(self):
2727
sys.argv = ['feedgen', ftype]
2828
try:
2929
__main__.main()
30-
except:
30+
except Exception:
3131
assert False
3232

3333
def test_file(self):
@@ -36,7 +36,7 @@ def test_file(self):
3636
sys.argv = ['feedgen', filename]
3737
try:
3838
__main__.main()
39-
except:
39+
except Exception:
4040
assert False
4141
os.close(fh)
4242
os.remove(filename)

0 commit comments

Comments
 (0)