Skip to content

Commit

Permalink
fix: Remove --rundir option, as it is not supported by Scrapyd and in…
Browse files Browse the repository at this point in the history
…troduces errors
  • Loading branch information
jpmckinney committed Jul 17, 2024
1 parent a16f98a commit 9fa4091
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ API
CLI
^^^

- Correct the usage message and long description, remove all ``twistd`` subcommands, and remove the ``--nodaemon`` and ``--python=`` options, which are overridden.
- Correct the usage message and long description.
- Remove the ``--rundir`` option, which only works if ``*_dir`` settings are absolute paths.
- Remove the ``--nodaemon`` option, which Scrapyd enables.
- Remove the ``--python=`` option, which Scrapyd needs to set to its application.
- Remove all ``twistd`` subcommands (FTP servers, etc.). Run ``twistd``, if needed.
- Run the ``scrapyd.__main__`` module, instead of the ``scrapyd.scripts.scrapyd_run`` module.

Fixed
Expand Down
4 changes: 2 additions & 2 deletions scrapyd/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class ServerOptions(twistd.ServerOptions):

def __init__(self):
super().__init__()
# main() always sets -n (--nodaemon) and -y (--python=).
self.longOpt = [opt for opt in self.longOpt if opt not in ('nodaemon', 'python=')]
# main() always sets -n (--nodaemon) and -y (--python=). Scrapyd's *_dir settings don't respect --rundir.
self.longOpt = [opt for opt in self.longOpt if opt not in ('nodaemon', 'python=', 'rundir=')]

@property
def subCommands(self):
Expand Down

0 comments on commit 9fa4091

Please sign in to comment.