Tests pass locally and fail on travis. This is attempt to improve situation

This commit is contained in:
Adam Shimali
2016-01-13 22:54:11 +00:00
parent d628d3d4cb
commit 2f802e3183
2 changed files with 8 additions and 4 deletions

View File

@@ -116,9 +116,13 @@ def _format_filename(filename):
return secure_filename(formatted_name)
def _open(file):
return open(file, 'r')
def _build_upload_result(csv_file):
try:
file = open(csv_file, 'r')
file = _open(csv_file, 'r')
pattern = re.compile(r'^\+44\s?\d{4}\s?\d{6}$')
reader = csv.DictReader(
file.read().splitlines(),