Skip to content

Commit f2f763e

Browse files
committed
Raise an error if a status does not exist
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 3f916b8 commit f2f763e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/packagedcode/debian.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ def parse_status_file(location, distro='debian'):
224224
"""
225225
Yield Debian Package objects from a dpkg `status` file or None.
226226
"""
227+
if not os.path.exists(location):
228+
raise FileNotFoundError('[Errno 2] No such file or directory: {}'.format(repr(location)))
227229
if not is_debian_status_file(location):
228230
return
229231

0 commit comments

Comments
 (0)