Skip to content

Commit

Permalink
Don't require custom method for sessionfile field
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox committed Sep 28, 2024
1 parent 01d45c5 commit 1108334
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Build `sessionfile` from engine properties instead of using custom method.

### Fixed

- Fix printing meta size in `lstor`
Expand Down
5 changes: 2 additions & 3 deletions src/pyrosimple/torrent/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,9 +559,8 @@ def _alias_accessor(o):
"sessionfile",
"path to session file",
matcher=matching.PatternFilter,
accessor=lambda o: os.path.expanduser(str(o.rpc_call("d.session_file"))),
requires=["d.session_file"],
prefilter_field="d.session_file=",
accessor=lambda o: os.path.expanduser(o._engine.properties["session.path"] + "/" + o.hash),
requires=["d.hash"],
)
yield ConstantField(
list,
Expand Down

0 comments on commit 1108334

Please sign in to comment.