From 4e7742b8e22bf763b60a75bb877f41468cd08e72 Mon Sep 17 00:00:00 2001 From: rdb Date: Sat, 28 Nov 2020 22:22:32 +0100 Subject: [PATCH] VFSImporter: replace deprecated U open() flag Fixes #1063 --- direct/src/showbase/VFSImporter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/direct/src/showbase/VFSImporter.py b/direct/src/showbase/VFSImporter.py index b59965ae3c..7ed45db6bd 100644 --- a/direct/src/showbase/VFSImporter.py +++ b/direct/src/showbase/VFSImporter.py @@ -65,7 +65,7 @@ class VFSImporter: vfile = vfs.getFile(filename, True) if vfile: return VFSLoader(dir_path, vfile, filename, - desc=('.py', 'U', imp.PY_SOURCE)) + desc=('.py', 'r', imp.PY_SOURCE)) # If there's no .py file, but there's a .pyc file, load that # anyway. @@ -93,7 +93,7 @@ class VFSImporter: vfile = vfs.getFile(filename, True) if vfile: return VFSLoader(dir_path, vfile, filename, packagePath=path, - desc=('.py', 'U', imp.PY_SOURCE)) + desc=('.py', 'r', imp.PY_SOURCE)) for ext in compiledExtensions: filename = Filename(path, '__init__.' + ext) vfile = vfs.getFile(filename, True)