management commands: Add sleep_forever to lib/management.

This commit is contained in:
Rishi Gupta
2018-08-15 12:02:56 -07:00
committed by Tim Abbott
parent d5f752df84
commit c3a912f8b6
4 changed files with 11 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
# Library code for use in management commands
import sys
import time
from argparse import ArgumentParser
from django.conf import settings
@@ -29,6 +30,10 @@ def check_config() -> None:
raise CommandError("Error: You must set %s in /etc/zulip/settings.py." % (setting_name,))
def sleep_forever() -> None:
while True: # nocoverage
time.sleep(10**9)
class ZulipBaseCommand(BaseCommand):
def add_realm_args(self, parser: ArgumentParser, required: bool=False,
help: Optional[str]=None) -> None: