Debug
Some checks are pending
gl/check check status: pending (151133ff31d78bd412cbf79f370863d445c03fa4)
Some checks are pending
gl/check check status: pending (151133ff31d78bd412cbf79f370863d445c03fa4)
This commit is contained in:
parent
3e3e86ceca
commit
151133ff31
@ -27,6 +27,11 @@ def parse_args():
|
||||
action='store_true',
|
||||
help='Upload all doc-types instead of only umn, api-ref and dev'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--debug',
|
||||
action='store_true',
|
||||
help='Enable Debug mode'
|
||||
)
|
||||
parser.add_argument(
|
||||
'--hosts',
|
||||
metavar='<host:port>',
|
||||
@ -62,7 +67,8 @@ def parse_args():
|
||||
|
||||
def main():
|
||||
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
if args.debug:
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
args = parse_args()
|
||||
|
||||
logging.debug("Obtaining data from otc_metadata")
|
||||
@ -86,11 +92,12 @@ def getData(environment, all_doc_types):
|
||||
metadatadata = metadata.service_types_with_doc_types(
|
||||
environment=environment
|
||||
)
|
||||
print(all_doc_types)
|
||||
if not all_doc_types:
|
||||
for i, doc in enumerate(metadatadata["docs"], 0):
|
||||
if doc["type"] not in ["umn", "api-ref", "dev"]:
|
||||
metadatadata["docs"].pop(i)
|
||||
|
||||
print(metadatadata)
|
||||
return metadatadata
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user