projects
/
gamesguru
/
ffpass.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e765bd
)
convert csv header to lowercase
author
louisabraham
<louis.abraham@yahoo.fr>
Fri, 31 May 2019 12:54:45 +0000
(14:54 +0200)
committer
louisabraham
<louis.abraham@yahoo.fr>
Fri, 31 May 2019 12:54:45 +0000
(14:54 +0200)
ffpass/__init__.py
patch
|
blob
|
history
diff --git
a/ffpass/__init__.py
b/ffpass/__init__.py
index bf8ede8dd0fb1d116949d3b0d9034c1697c2c9e3..0d2521cb15b72a29f3f9c599f06e006920a7e7e6 100644
(file)
--- a/
ffpass/__init__.py
+++ b/
ffpass/__init__.py
@@
-175,9
+175,15
@@
def exportLogins(key, jsonLogins):
return logins
+def lower_header(from_file):
+ it = iter(from_file)
+ yield next(it).lower()
+ yield from it
+
+
def readCSV(from_file):
logins = []
- reader = csv.DictReader(
from_file
)
+ reader = csv.DictReader(
lower_header(from_file)
)
for row in reader:
logins.append((rawURL(row["url"]), row["username"], row["password"]))
return logins