Don't call next() method in CSV reader The next() method was renamed in python3. Simply avoid calling it to ensure portability Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
diff --git a/tools/keymap-gen b/tools/keymap-gen index 5dc7d3d..3ed4b99 100755 --- a/tools/keymap-gen +++ b/tools/keymap-gen
@@ -143,13 +143,17 @@ def load(self, filename): self._generate_checksum(filename) - with open(filename, 'rb') as f: + with open(filename, 'r') as f: reader = csv.reader(f) - # Discard column headings - reader.next() + first = True for row in reader: + # Discard column headings + if first: + first = False + continue + # We special case MAP_LINUX since that is out # master via which all other mappings are done linux = self.load_linux(row)