Fix Travis Builds
This patch fixes the Travis builds which were broken due to new Flake8 versions which complained about previously accepted code.
This commit is contained in:
parent
9026316391
commit
dd15d63fbc
2 changed files with 7 additions and 7 deletions
|
@ -64,11 +64,11 @@ def ensure_format(val, allowed, required, allowed_values=None, defaults=None):
|
||||||
return val
|
return val
|
||||||
|
|
||||||
|
|
||||||
def formatRFC2822(d):
|
def formatRFC2822(date):
|
||||||
'''Make sure the locale setting do not interfere with the time format.
|
'''Make sure the locale setting do not interfere with the time format.
|
||||||
'''
|
'''
|
||||||
l = locale.setlocale(locale.LC_ALL)
|
old = locale.setlocale(locale.LC_ALL)
|
||||||
locale.setlocale(locale.LC_ALL, 'C')
|
locale.setlocale(locale.LC_ALL, 'C')
|
||||||
d = d.strftime('%a, %d %b %Y %H:%M:%S %z')
|
date = date.strftime('%a, %d %b %Y %H:%M:%S %z')
|
||||||
locale.setlocale(locale.LC_ALL, l)
|
locale.setlocale(locale.LC_ALL, old)
|
||||||
return d
|
return date
|
||||||
|
|
|
@ -27,7 +27,7 @@ class TestSequenceFunctions(unittest.TestCase):
|
||||||
sys.argv = ['feedgen', ftype]
|
sys.argv = ['feedgen', ftype]
|
||||||
try:
|
try:
|
||||||
__main__.main()
|
__main__.main()
|
||||||
except:
|
except Exception:
|
||||||
assert False
|
assert False
|
||||||
|
|
||||||
def test_file(self):
|
def test_file(self):
|
||||||
|
@ -36,7 +36,7 @@ class TestSequenceFunctions(unittest.TestCase):
|
||||||
sys.argv = ['feedgen', filename]
|
sys.argv = ['feedgen', filename]
|
||||||
try:
|
try:
|
||||||
__main__.main()
|
__main__.main()
|
||||||
except:
|
except Exception:
|
||||||
assert False
|
assert False
|
||||||
os.close(fh)
|
os.close(fh)
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
|
|
Loading…
Reference in a new issue