summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2015-07-21 16:12:51 -0600
committerStephen Warren <swarren@nvidia.com>2015-07-21 16:15:30 -0600
commitb731e2d3a58ff119bb50129694a1032e026f9d8f (patch)
tree8b52a789ae40cff05b9a67b9eb354a525179489e
parent992e36e36c8ff3a91c6d4578d2c2f76ed946f99b (diff)
downloadtegra-pinmux-scripts-b731e2d3a58ff119bb50129694a1032e026f9d8f.tar.gz
csv-to-board: allow 'Ball Name' in an abitrary column
csv-to-board currently parses the header row to find out which column each desired piece of data is located in. However, it checks a hard-coded column to determine which row is the header row. Enhance the script to allow the header row identification data to be in an arbitrary column. Signed-off-by: Stephen Warren <swarren@nvidia.com>
-rwxr-xr-xcsv-to-board.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/csv-to-board.py b/csv-to-board.py
index 1d98cfa..2f99f4a 100755
--- a/csv-to-board.py
+++ b/csv-to-board.py
@@ -193,7 +193,7 @@ with open(board_conf['filename'], newline='') as fh:
# Header rows
if not found_header:
- if row[0] != 'Ball Name':
+ if 'Ball Name' not in row:
if lnum > 25:
print('ERROR: Header row not found', file=sys.stderr)
sys.exit(1)