Use blacklisting instead of whitelisting for checking daemon support

Just to be on the safe side... This is _exactly_ the same behaviour
as it was under 1.2.x again.
This commit is contained in:
Gina Häußge 2017-04-06 10:02:48 +02:00
parent 163fd83bf5
commit 09d1025dfc
2 changed files with 5 additions and 5 deletions

View file

@ -160,11 +160,11 @@ def octo(ctx, **kwargs):
"start|stop|restart\" is deprecated, please use "
"\"octoprint daemon start|stop|restart\" from now on")
if sys.platform.startswith("linux") or sys.platform.startswith("freebsd"):
if sys.platform == "win32" or sys.platform == "darwin":
click.echo("Sorry, daemon mode is not supported under your operating system right now")
else:
from octoprint.cli.server import daemon_command
ctx.invoke(daemon_command, command=daemon, **kwargs)
else:
click.echo("Sorry, daemon mode is not supported under your operating system right now")
else:
click.echo("Starting the server via \"octoprint\" is deprecated, "
"please use \"octoprint serve\" from now on.")

View file

@ -150,8 +150,8 @@ def serve_command(ctx, **kwargs):
allow_root, logging, verbosity, safe_mode)
if sys.platform.startswith("linux") or sys.platform.startswith("freebsd"):
# we only support daemon mode under Linux and FreeBSD for now
if sys.platform != "win32" and sys.platform != "darwin":
# we do not support daemon mode under windows or macosx
@server_commands.command(name="daemon")
@server_options