Skip to content

Commit 519282a

Browse files
committed
fix: Clean up states
1 parent 618fd42 commit 519282a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/c2pa/c2pa.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,7 @@ def __init__(self,
13991399

14001400
# Store the file to close it later
14011401
self._backing_file = file
1402-
1403-
# Mark as initialized after successful creation
1402+
14041403
self._initialized = True
14051404

14061405
except Exception as e:
@@ -1462,8 +1461,7 @@ def __init__(self,
14621461
)
14631462

14641463
self._backing_file = file
1465-
1466-
# Mark as initialized after successful creation
1464+
14671465
self._initialized = True
14681466
except Exception as e:
14691467
if self._own_stream:
@@ -2165,7 +2163,6 @@ def from_archive(cls, stream: Any) -> 'Builder':
21652163
raise C2paError(error)
21662164
raise C2paError("Failed to create builder from archive")
21672165

2168-
# Mark as initialized after successful creation from archive
21692166
builder._initialized = True
21702167
return builder
21712168

0 commit comments

Comments
 (0)