Skip to content

Commit

Permalink
Merge pull request #2138 from ogayot/backlinks
Browse files Browse the repository at this point in the history
storage: set backlinks only if other post-init methods succeed
  • Loading branch information
ogayot authored Jan 17, 2025
2 parents dab218e + 133dcc7 commit aaa1738
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion subiquity/models/filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,11 @@ def _do_post_inits(obj):
def fsobj(typ):
def wrapper(c):
c.__attrs_post_init__ = _do_post_inits
c._post_inits = [_set_backlinks]
c._post_inits = []
class_post_init = getattr(c, "__post_init__", None)
if class_post_init is not None:
c._post_inits.append(class_post_init)
c._post_inits.append(_set_backlinks)
c.type = attributes.const(typ)
c.id = attr.ib(default=None)
c._m = attr.ib(repr=None, default=None)
Expand Down

0 comments on commit aaa1738

Please sign in to comment.