kannibalox / pyrosimple

An overhauled fork of the pyrocore tools for rTorrent
https://kannibalox.github.io/pyrosimple/
GNU General Public License v3.0
48 stars 5 forks source link

Don't require rtorrent.rc file if we don't want to interact with rtorrent #4

Closed ghost closed 2 years ago

ghost commented 2 years ago

Commands such as mktor and chtor complain that ~/.rtorrent.rc doesn't exist even if I don't want to interface with rtorrent at all. As a workaround, PYRO_RTORRENT_RC=/dev/null seems to work, but it would be better to not have to do that.

❯ chtor --version
chtor 2.0.0rc4 on Python 3.10.4

❯ git rev-parse HEAD
d713a2aed82b1a50e98dc4915ebbade47d75aa5a

❯ chtor
Traceback (most recent call last):
  File "/home/nyuszika7h/src/pyrosimple/src/pyrosimple/scripts/base.py", line 181, in run
    self.get_options()
  File "/home/nyuszika7h/src/pyrosimple/src/pyrosimple/scripts/base.py", line 235, in get_options
    self.engine = rtorrent.RtorrentEngine()
  File "/home/nyuszika7h/src/pyrosimple/src/pyrosimple/torrent/rtorrent.py", line 616, in __init__
    config.autoload_scgi_url()
  File "/home/nyuszika7h/src/pyrosimple/src/pyrosimple/config.py", line 105, in autoload_scgi_url
    raise error.UserError(f"rTorrent RC file '{rcfile}' doesn't exist!")
pyrosimple.error.UserError: rTorrent RC file '/home/nyuszika7h/.rtorrent.rc' doesn't exist!

❯ PYRO_RTORRENT_RC=/dev/null chtor
usage: chtor [options] <metafile>...

chtor 2.0.0rc4 on Python 3.10.4

Change attributes of a bittorrent metafile.

For more details, see the full documentation at

    https://kannibalox.github.io/pyrosimple/
chtor: error: No metafiles given, nothing to do!
kannibalox commented 2 years ago

Thanks for reporting, it ended up being an unintended consequence of some other improvements.