Skip to content

Fix for rTorrent v0.9.7+#2250

Merged
cvium merged 2 commits intoFlexget:developfrom
XVicarious:fix_rtorrent
Nov 13, 2018
Merged

Fix for rTorrent v0.9.7+#2250
cvium merged 2 commits intoFlexget:developfrom
XVicarious:fix_rtorrent

Conversation

@XVicarious
Copy link
Copy Markdown
Contributor

Motivation for changes:

As described in #2239, starting with rTorrent v0.9.7. I was mistaken as to when these were taken out. They were depreciated as of v0.9.0, and then finally removed in v0.9.7.

Detailed changes:

  • Wrap the d.multicall in a try/except catching a fault
  • If the fault code is -506, call d.multicall2 which has a slightly different definition
  • Otherwise, raise the error

Addressed issues:

Log and/or tests output (preferably both):

Line 4 here in this log. For reference, I am on rTorrent v0.9.7.

...
2018-11-12 13:55 DEBUG    task          test_rtorrent   executing test_rtorrent
2018-11-12 13:55 DEBUG    status        test_rtorrent   Adding new task test_rtorrent
2018-11-12 13:55 WARNING  task          test_rtorrent   Aborting task (plugin: from_rtorrent)
2018-11-12 13:55 DEBUG    task_queue                    task test_rtorrent aborted: TaskAbort(reason=Could not get torrents (main): <Fault -506: "Method 'd.multicall' not defined">, silent=False)
2018-11-12 13:55 DEBUG    task_queue                    task queue shut down
2018-11-12 13:55 INFO     ipc.rpyc                      server has terminated
2018-11-12 13:55 INFO     ipc.rpyc                      listener closed
2018-11-12 13:55 DEBUG    util.simple_persistence                 Flushing simple persistence for task None to db.
2018-11-12 13:55 DEBUG    manager                       Shutting down
2018-11-12 13:55 INFO     manager                       Removed test database
2018-11-12 13:55 DEBUG    manager                       Removed /home/xvicarious/repos/Flexget/.test-config-lock

…stead if the error is -506, else raise the error
@cvium
Copy link
Copy Markdown
Contributor

cvium commented Nov 12, 2018

If it has been deprecated in 0.9.0, why not just update the call to use multicall2 instead of a try-catch? I find it very hard to believe anyone is using such an old version and they should be upgrading anyway.

@XVicarious
Copy link
Copy Markdown
Contributor Author

I was trying to preserve functionality for older versions of rTorrent, however as v0.9 was released in 2011, I'll just make it call d.multicall2.

v0.9 was released in 2011, keeping support for `d.multicall` is useless
@cvium
Copy link
Copy Markdown
Contributor

cvium commented Nov 13, 2018

I assume you've tested that it works?

@XVicarious
Copy link
Copy Markdown
Contributor Author

XVicarious commented Nov 13, 2018 via email

@cvium cvium merged commit 3dc07b6 into Flexget:develop Nov 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rtorrent 0.9.x no longer has d.multicall

2 participants