Cleanup: quiet warning accessing deprecated attribute in bl_test
This commit is contained in:
parent
91d3a54869
commit
51bf1680bd
|
@ -32,9 +32,18 @@ def replace_bpy_app_version():
|
|||
app = bpy.app
|
||||
app_fake = type(bpy)("bpy.app")
|
||||
|
||||
app_attr_exclude = {
|
||||
# This causes a noisy warning every time.
|
||||
"binary_path_python",
|
||||
}
|
||||
|
||||
for attr in dir(app):
|
||||
if not attr.startswith("_"):
|
||||
setattr(app_fake, attr, getattr(app, attr))
|
||||
if attr.startswith("_"):
|
||||
continue
|
||||
if attr in app_attr_exclude:
|
||||
continue
|
||||
|
||||
setattr(app_fake, attr, getattr(app, attr))
|
||||
|
||||
app_fake.version = 0, 0, 0
|
||||
app_fake.version_string = "0.00 (sub 0)"
|
||||
|
|
Loading…
Reference in New Issue