All tests pass!
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
# file_type.py
|
||||
# Identify type of file: file, directory, link, broken link
|
||||
|
||||
import errno
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
class FileType():
|
||||
@@ -13,7 +15,7 @@ class FileType():
|
||||
if p.is_symlink():
|
||||
return "broken-link"
|
||||
else:
|
||||
raise FileNotFound(errno.ENOENT, os.strerror(errno.ENOENT), filename)
|
||||
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), filename)
|
||||
if p.is_symlink():
|
||||
return "symlink"
|
||||
if p.is_dir():
|
||||
|
||||
Reference in New Issue
Block a user