Browse Source

[2937] Parse CSV in strict mode

Don't accept invalid inputs. It seems some versions of the csv library
rejected this before, but some didn't. Making sure all of them reject
now, to get more reliable operation and consistent behavior.
Michal 'vorner' Vaner 12 years ago
parent
commit
4bc06a779c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bin/usermgr/b10-cmdctl-usermgr.py.in

+ 1 - 1
src/bin/usermgr/b10-cmdctl-usermgr.py.in

@@ -75,7 +75,7 @@ class UserManager:
             # Just let any file read error bubble up; it will
             # be caught in the run() method
             with open(self.options.output_file, newline='') as csvfile:
-                reader = csv.reader(csvfile)
+                reader = csv.reader(csvfile, strict=True)
                 for row in reader:
                     self.user_info[row[0]] = row