Skip to content

Commit 59b59bd

Browse files
committed
specify which file not found
1 parent aa3308d commit 59b59bd

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

gnss_lib_py/parsers/android.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def preprocess(self, input_path):
420420
if not isinstance(input_path, (str, os.PathLike)):
421421
raise TypeError("input_path must be string or path-like")
422422
if not os.path.exists(input_path):
423-
raise FileNotFoundError("file not found")
423+
raise FileNotFoundError(input_path,"file not found")
424424

425425
with open(input_path, encoding="utf8") as csvfile:
426426
reader = csv.reader(csvfile)
@@ -490,7 +490,7 @@ def preprocess(self, input_path):
490490
if not isinstance(input_path, (str, os.PathLike)):
491491
raise TypeError("input_path must be string or path-like")
492492
if not os.path.exists(input_path):
493-
raise FileNotFoundError("file not found")
493+
raise FileNotFoundError(input_path,"file not found")
494494

495495
with open(input_path, encoding="utf8") as csvfile:
496496
reader = csv.reader(csvfile)
@@ -540,7 +540,7 @@ def make_csv(input_path, output_directory, field, show_path=False):
540540
if not isinstance(input_path, (str, os.PathLike)):
541541
raise TypeError("input_path must be string or path-like")
542542
if not os.path.exists(input_path):
543-
raise FileNotFoundError("file not found")
543+
raise FileNotFoundError(input_path,"file not found")
544544

545545
with open(input_path, 'r', encoding="utf8") as in_txt:
546546
for line in in_txt:

gnss_lib_py/parsers/clk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(self, input_paths):
5757
if not isinstance(input_path, (str, os.PathLike)):
5858
raise TypeError("input_path must be string or path-like")
5959
if not os.path.exists(input_path):
60-
raise FileNotFoundError("file not found")
60+
raise FileNotFoundError(input_path,"file not found")
6161

6262
# Read Clock file
6363
with open(input_path, 'r', encoding="utf-8") as infile:

gnss_lib_py/parsers/navdata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def from_csv_path(self, csv_path, **kwargs):
106106
if not isinstance(csv_path, (str, os.PathLike)):
107107
raise TypeError("csv_path must be string or path-like")
108108
if not os.path.exists(csv_path):
109-
raise FileNotFoundError("file not found")
109+
raise FileNotFoundError(csv_path,"file not found")
110110

111111
self._build_navdata()
112112

gnss_lib_py/parsers/nmea.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self, input_path, msg_types=None,
7474
if not isinstance(input_path, (str, os.PathLike)):
7575
raise TypeError("input_path must be string or path-like")
7676
if not os.path.exists(input_path):
77-
raise FileNotFoundError("file not found")
77+
raise FileNotFoundError(input_path,"file not found")
7878

7979
with open(input_path, "r", encoding='UTF-8') as open_file:
8080
for line in open_file:

gnss_lib_py/parsers/sp3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def __init__(self, input_paths):
5959
if not isinstance(input_path, (str, os.PathLike)):
6060
raise TypeError("input_path must be string or path-like")
6161
if not os.path.exists(input_path):
62-
raise FileNotFoundError("file not found")
62+
raise FileNotFoundError(input_path,"file not found")
6363

6464
# Load in the file
6565
with open(input_path, 'r', encoding="utf-8") as infile:

0 commit comments

Comments
 (0)