diff options
author | prathamesh | 2017-11-06 15:51:05 +0530 |
---|---|---|
committer | prathamesh | 2017-11-06 15:51:05 +0530 |
commit | bce87033267afdbb4aff958c26d1e6d0cac6d220 (patch) | |
tree | 19c4c0ae1081e4ea17aea81b5a92dfd7a10a066d /yaksh/file_utils.py | |
parent | cde2eeb4f15de06def22d3bf07120a0a416e807f (diff) | |
download | online_test-bce87033267afdbb4aff958c26d1e6d0cac6d220.tar.gz online_test-bce87033267afdbb4aff958c26d1e6d0cac6d220.tar.bz2 online_test-bce87033267afdbb4aff958c26d1e6d0cac6d220.zip |
Added info for upload
converted list to set as dict.keys() returns list in python 2.7
Diffstat (limited to 'yaksh/file_utils.py')
-rw-r--r-- | yaksh/file_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/yaksh/file_utils.py b/yaksh/file_utils.py index 361b29c..0d80b8f 100644 --- a/yaksh/file_utils.py +++ b/yaksh/file_utils.py @@ -68,12 +68,12 @@ def is_csv(document): def headers_present(dict_reader, headers): fields = dict_reader.fieldnames - clist = set() + header_fields = set() for field in fields: if field.strip() in headers.keys(): headers[field.strip()] = field - clist.add(field.strip()) - if clist != headers.keys(): + header_fields.add(field.strip()) + if header_fields != set(headers.keys()): return False return True |