Skip to content

Commit

Permalink
remove this broken module as well
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed May 5, 2024
1 parent dab9c6b commit 9e10f58
Showing 1 changed file with 0 additions and 39 deletions.
39 changes: 0 additions & 39 deletions tmtccmd/config/globals.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import collections.abc
import enum
import logging
import pprint

from deprecated.sphinx import deprecated
Expand Down Expand Up @@ -106,43 +104,6 @@ def check_and_set_other_args(args):
update_global(CoreGlobalIds.TC_SEND_TIMEOUT_FACTOR, 3)


@deprecated(version="8.0.0", reason="globals module deprecated")
def check_and_set_core_service_arg(
service_arg: any, custom_service_list: collections.abc.Iterable = None
):
from tmtccmd.util.conf_util import check_args_in_dict

in_enum, service_value = check_args_in_dict(
param=service_arg, iterable=CoreServiceList, warning_hint="service"
)
if in_enum:
update_global(CoreGlobalIds.CURRENT_SERVICE, service_value)
return

service_arg_invalid = False
if custom_service_list is not None:
for custom_services_entry in custom_service_list:
in_enum, service_value = check_args_in_dict(
param=service_arg,
iterable=custom_services_entry,
warning_hint="custom mode",
)
if in_enum:
break
if not in_enum:
service_arg_invalid = True
else:
service_arg_invalid = True

if service_arg_invalid:
logging.getLogger(__name__).warning(
"Passed service argument might be invalid, "
f"setting to {CoreServiceList.SERVICE_17}"
)
service_value = CoreServiceList.SERVICE_17
update_global(CoreGlobalIds.CURRENT_SERVICE, service_value)


@deprecated(version="8.0.0", reason="use command tree API instead")
def get_default_tmtc_defs() -> TmtcDefinitionWrapper:
global DEF_WRAPPER
Expand Down

0 comments on commit 9e10f58

Please sign in to comment.