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:
		@ -27,6 +27,11 @@ def parse_args():
 | 
				
			|||||||
        action='store_true',
 | 
					        action='store_true',
 | 
				
			||||||
        help='Upload all doc-types instead of only umn, api-ref and dev'
 | 
					        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(
 | 
					    parser.add_argument(
 | 
				
			||||||
        '--hosts',
 | 
					        '--hosts',
 | 
				
			||||||
        metavar='<host:port>',
 | 
					        metavar='<host:port>',
 | 
				
			||||||
@ -62,7 +67,8 @@ def parse_args():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
def main():
 | 
					def main():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    logging.basicConfig(level=logging.DEBUG)
 | 
					    if args.debug:
 | 
				
			||||||
 | 
					        logging.basicConfig(level=logging.DEBUG)
 | 
				
			||||||
    args = parse_args()
 | 
					    args = parse_args()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    logging.debug("Obtaining data from otc_metadata")
 | 
					    logging.debug("Obtaining data from otc_metadata")
 | 
				
			||||||
@ -86,11 +92,12 @@ def getData(environment, all_doc_types):
 | 
				
			|||||||
    metadatadata = metadata.service_types_with_doc_types(
 | 
					    metadatadata = metadata.service_types_with_doc_types(
 | 
				
			||||||
        environment=environment
 | 
					        environment=environment
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
 | 
					    print(all_doc_types)
 | 
				
			||||||
    if not all_doc_types:
 | 
					    if not all_doc_types:
 | 
				
			||||||
        for i, doc in enumerate(metadatadata["docs"], 0):
 | 
					        for i, doc in enumerate(metadatadata["docs"], 0):
 | 
				
			||||||
            if doc["type"] not in ["umn", "api-ref", "dev"]:
 | 
					            if doc["type"] not in ["umn", "api-ref", "dev"]:
 | 
				
			||||||
                metadatadata["docs"].pop(i)
 | 
					                metadatadata["docs"].pop(i)
 | 
				
			||||||
 | 
					    print(metadatadata)
 | 
				
			||||||
    return metadatadata
 | 
					    return metadatadata
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user