Skip to content

Commit fc0fc1f

Browse files
committed
fix: Restore --nodaemon, in case it was in use
1 parent 66da725 commit fc0fc1f

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

docs/news.rst

+7-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ Added
1111

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

14+
Fixed
15+
~~~~~
16+
17+
- Restore the ``--nodaemon`` (``-n``) option (which Scrapyd enables, regardless), to avoid "option --nodaemon not recognized".
18+
1419
1.5.0b1 (2024-07-25)
1520
--------------------
1621

@@ -74,8 +79,8 @@ CLI
7479

7580
- Correct the usage message and long description.
7681
- Remove the ``--rundir`` option, which only works if ``*_dir`` settings are absolute paths.
77-
- Remove the ``--nodaemon`` option, which Scrapyd enables.
78-
- Remove the ``--python=`` option, which Scrapyd needs to set to its application.
82+
- Remove the ``--nodaemon`` (``-n``) option, which Scrapyd enables.
83+
- Remove the ``--python=`` (``-y``) option, which Scrapyd needs to set to its application.
7984
- Remove all ``twistd`` subcommands (FTP servers, etc.). Run ``twistd``, if needed.
8085
- Run the ``scrapyd.__main__`` module, instead of the ``scrapyd.scripts.scrapyd_run`` module.
8186

scrapyd/__main__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ class ServerOptions(twistd.ServerOptions):
1212

1313
def __init__(self):
1414
super().__init__()
15-
# main() always sets -n (--nodaemon) and -y (--python=). Scrapyd's *_dir settings don't respect --rundir.
16-
self.longOpt = [opt for opt in self.longOpt if opt not in ("nodaemon", "python=", "rundir=")]
15+
# main() always sets -n (--nodaemon) and -y (--python=). -y can be set only once. -n is okay to leave as a
16+
# no-op. Scrapyd's *_dir settings don't respect --rundir.
17+
self.longOpt = [opt for opt in self.longOpt if opt not in ("python=", "rundir=")]
1718

1819
@property
1920
def subCommands(self):

0 commit comments

Comments
 (0)