Apparently python's os.path.isfile doesn't consider special files like one in /proc/self/fd/ to be a file. So instead of testing with 'isfile', test with 'not isdir'.
Signed-off-by: Dylan Baker <[email protected]> --- framework/backends/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/backends/__init__.py b/framework/backends/__init__.py index 43a45d1..289b6da 100644 --- a/framework/backends/__init__.py +++ b/framework/backends/__init__.py @@ -119,7 +119,9 @@ def load(file_path): """ extension = None - if os.path.isfile(file_path): + # This should be 'not isdir', since an fd does not evaluate to True using + # 'os.path.isfile' + if not os.path.isdir(file_path): extension = os.path.splitext(file_path)[1] if not extension: extension = '' -- 2.4.5 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
