mirror of
https://github.com/norohind/EDMC_SpanshRouter.git
synced 2025-06-12 13:22:06 +03:00
Fixed issue with blank lines in CSV files
This commit is contained in:
parent
913b94cb1a
commit
a8b4e62a27
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"python.pythonPath": "/usr/bin/python2"
|
||||
}
|
BIN
EDMC_SpanshRouter_210.zip
Normal file
BIN
EDMC_SpanshRouter_210.zip
Normal file
Binary file not shown.
2
load.py
2
load.py
@ -60,6 +60,7 @@ def plugin_start(plugin_dir):
|
||||
route_reader = csv.reader(csvfile)
|
||||
|
||||
for row in route_reader:
|
||||
if row not in (None, "", []):
|
||||
this.route.append(row)
|
||||
|
||||
try:
|
||||
@ -204,6 +205,7 @@ def plot_csv(self=None):
|
||||
|
||||
this.jumps_left = 0
|
||||
for row in route_reader:
|
||||
if row not in (None, "", []):
|
||||
this.route.append([row[0], row[4]])
|
||||
this.jumps_left += int(row[4])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user