summaryrefslogtreecommitdiff
path: root/yaksh/file_utils.py
diff options
context:
space:
mode:
authorprathamesh2017-11-06 15:51:05 +0530
committerprathamesh2017-11-06 15:51:05 +0530
commitbce87033267afdbb4aff958c26d1e6d0cac6d220 (patch)
tree19c4c0ae1081e4ea17aea81b5a92dfd7a10a066d /yaksh/file_utils.py
parentcde2eeb4f15de06def22d3bf07120a0a416e807f (diff)
downloadonline_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.py6
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