Signed-off-by: CocoByte <nicolle.leclair@gmail.com>
This commit is contained in:
CocoByte 2023-10-06 03:23:16 -06:00
parent 604821ad07
commit bede4c8607
No known key found for this signature in database
GPG key ID: BBFAA2526384C97F

View file

@ -29,10 +29,9 @@ class termColors:
UNDERLINE = "\033[4m" UNDERLINE = "\033[4m"
BackgroundLightYellow = "\033[103m" BackgroundLightYellow = "\033[103m"
def print_debug_mode_statements(
def print_debug_mode_statements(self, self, debug_on: bool, debug_max_entries_to_parse: int
debug_on: bool, ):
debug_max_entries_to_parse: int):
"""Prints additional terminal statements to indicate if --debug """Prints additional terminal statements to indicate if --debug
or --limitParse are in use""" or --limitParse are in use"""
if debug_on: if debug_on:
@ -67,7 +66,7 @@ class Command(BaseCommand):
parser.add_argument( parser.add_argument(
"--limitParse", "--limitParse",
default=0, default=0,
help="Sets max number of entries to load, set to 0 to load all entries" help="Sets max number of entries to load, set to 0 to load all entries",
) )
def handle( # noqa: C901 def handle( # noqa: C901
@ -147,21 +146,21 @@ class Command(BaseCommand):
logger.info( logger.info(
f"""{termColors.YELLOW} f"""{termColors.YELLOW}
>> Updated {transition_domain_name} state from >> Updated {transition_domain_name} state from
'{current_state}' to '{existingEntry.state}{termColors.ENDC}' '{current_state}' to '{existingEntry.state}'
(no domain invitation entry added)""" (no domain invitation entry added)
{termColors.ENDC}"""
) )
except Domain.DoesNotExist: except Domain.DoesNotExist:
# no matching entry, make one # no matching entry, make one
newEntry = Domain( newEntry = Domain(
name=transition_domain_name, name=transition_domain_name, state=transition_domain_status
state=transition_domain_status
) )
domains_to_create.append(newEntry) domains_to_create.append(newEntry)
domain_invitations_to_create.append( domain_invitations_to_create.append(
DomainInvitation( DomainInvitation(
email=transition_domain_email.lower(), email=transition_domain_email.lower(),
domain=transition_domain_name domain=transition_domain_name,
) )
) )
@ -247,5 +246,3 @@ class Command(BaseCommand):
{termColors.ENDC} {termColors.ENDC}
""" """
) )