Show More
@@ -83,12 +83,13 b' def get_py_filename(name):' | |||||
83 | """ |
|
83 | """ | |
84 |
|
84 | |||
85 | name = os.path.expanduser(name) |
|
85 | name = os.path.expanduser(name) | |
86 | if not os.path.isfile(name) and not name.endswith('.py'): |
|
|||
87 | name += '.py' |
|
|||
88 | if os.path.isfile(name): |
|
86 | if os.path.isfile(name): | |
89 | return name |
|
87 | return name | |
90 | else: |
|
88 | if not name.endswith('.py'): | |
91 | raise IOError('File `%r` not found.' % name) |
|
89 | py_name = name + '.py' | |
|
90 | if os.path.isfile(py_name): | |||
|
91 | return py_name | |||
|
92 | raise IOError('File `%r` not found.' % name) | |||
92 |
|
93 | |||
93 |
|
94 | |||
94 | def filefind(filename: str, path_dirs=None) -> str: |
|
95 | def filefind(filename: str, path_dirs=None) -> str: |
General Comments 0
You need to be logged in to leave comments.
Login now