mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
ifcopenshell.file: drop workarounds for older builds
Introduced in aeed371 and it's been a while.
This commit is contained in:
@@ -23,7 +23,6 @@ import numbers
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import types
|
|
||||||
import weakref
|
import weakref
|
||||||
import zipfile
|
import zipfile
|
||||||
from collections.abc import Callable, Generator
|
from collections.abc import Callable, Generator
|
||||||
@@ -251,12 +250,7 @@ READ_ERROR = ifcopenshell_wrapper.file_open_status.READ_ERROR
|
|||||||
NO_HEADER = ifcopenshell_wrapper.file_open_status.NO_HEADER
|
NO_HEADER = ifcopenshell_wrapper.file_open_status.NO_HEADER
|
||||||
UNSUPPORTED_SCHEMA = ifcopenshell_wrapper.file_open_status.UNSUPPORTED_SCHEMA
|
UNSUPPORTED_SCHEMA = ifcopenshell_wrapper.file_open_status.UNSUPPORTED_SCHEMA
|
||||||
INVALID_SYNTAX = ifcopenshell_wrapper.file_open_status.INVALID_SYNTAX
|
INVALID_SYNTAX = ifcopenshell_wrapper.file_open_status.INVALID_SYNTAX
|
||||||
|
UNKNOWN = ifcopenshell_wrapper.file_open_status.UNKNOWN
|
||||||
# TODO: Workaround for old builds, remove after build stabilizes.
|
|
||||||
try:
|
|
||||||
UNKNOWN = ifcopenshell_wrapper.file_open_status.UNKNOWN
|
|
||||||
except:
|
|
||||||
UNKNOWN = 5 # Workaround
|
|
||||||
|
|
||||||
import struct
|
import struct
|
||||||
|
|
||||||
@@ -1066,13 +1060,8 @@ class file:
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def header(self) -> file_header:
|
def header(self) -> file_header:
|
||||||
# TODO: Workaround for old builds, remove after build stabilizes.
|
|
||||||
# TODO: No need for `wrapped_data.header` to be a method - should use `@property`?
|
# TODO: No need for `wrapped_data.header` to be a method - should use `@property`?
|
||||||
header = self.wrapped_data.header
|
return file_header(self, self.wrapped_data.header())
|
||||||
if isinstance(header, types.MethodType):
|
|
||||||
return file_header(self, self.wrapped_data.header())
|
|
||||||
else:
|
|
||||||
return self.wrapped_data.header
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def storage(self) -> Optional[rocksdb_file_storage]:
|
def storage(self) -> Optional[rocksdb_file_storage]:
|
||||||
|
|||||||
Reference in New Issue
Block a user