diff options
| author | Alon Levy <alon@pobox.com> | 2015-03-02 15:03:09 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2015-03-02 15:03:09 +0200 |
| commit | 8cb62074eaa6f7c2105c2e0944294186384c6fef (patch) | |
| tree | ef8b55e7e271fdb4018ee040b0339e9f12172c96 /src/local | |
| parent | 5d572f7a497b9a9d1bef6d20b974288dc645bcb3 (diff) | |
domain/cri/from_csv: fixes and update to take comma separated csv
Diffstat (limited to 'src/local')
| -rwxr-xr-x | src/local/domain/cri/from_csv | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/local/domain/cri/from_csv b/src/local/domain/cri/from_csv index 593f1fc0..a5c5117b 100755 --- a/src/local/domain/cri/from_csv +++ b/src/local/domain/cri/from_csv @@ -13,7 +13,8 @@ import argparse import string import csv -root = os.path.join(os.path.dirname(__file__), '..', '..') +root = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..')) +print("root = %s" % root) sys.path.append(os.path.join(root, 'src', 'server')) from rz_api_common import sanitize_input__topo_diff @@ -75,7 +76,7 @@ def link_dict(source_id, target_id, label, the_id): class CSV(object): def __init__(self, filename): - rows = list(csv.reader(open(filename), 'excel-tab')) + rows = list(csv.reader(open(filename), 'excel')) headers = rows[0] self.parse_headers(headers) #import pdb; pdb.set_trace() |
