Skip to content

Commit

Permalink
fix: Restore --nodaemon, in case it was in use
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jul 26, 2024
1 parent 66da725 commit fc0fc1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
9 changes: 7 additions & 2 deletions docs/news.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Added

- Default webservices can be disabled. See :ref:`config-services`.

Fixed
~~~~~

- Restore the ``--nodaemon`` (``-n``) option (which Scrapyd enables, regardless), to avoid "option --nodaemon not recognized".

1.5.0b1 (2024-07-25)
--------------------

Expand Down Expand Up @@ -74,8 +79,8 @@ CLI

- 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 the ``--nodaemon`` (``-n``) option, which Scrapyd enables.
- Remove the ``--python=`` (``-y``) 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.

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

def __init__(self):
super().__init__()
# 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=")]
# main() always sets -n (--nodaemon) and -y (--python=). -y can be set only once. -n is okay to leave as a
# no-op. Scrapyd's *_dir settings don't respect --rundir.
self.longOpt = [opt for opt in self.longOpt if opt not in ("python=", "rundir=")]

@property
def subCommands(self):
Expand Down

0 comments on commit fc0fc1f

Please sign in to comment.