Raise an exception if no mod-stats in knot
This commit is contained in:
		
							
								
								
									
										2
									
								
								knot_
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								knot_
									
									
									
									
									
								
							@@ -40,6 +40,8 @@ if __name__ == '__main__':
 | 
				
			|||||||
    file = getenv('stats_file_path')
 | 
					    file = getenv('stats_file_path')
 | 
				
			||||||
    with open(file, "r") as stats_file:
 | 
					    with open(file, "r") as stats_file:
 | 
				
			||||||
        stats = yaml.safe_load(stats_file)
 | 
					        stats = yaml.safe_load(stats_file)
 | 
				
			||||||
 | 
					    if not "mod-stats" in stats:
 | 
				
			||||||
 | 
					        raise Exception("Please configure knot with mod-stats")
 | 
				
			||||||
    if len(argv) > 1 and argv[1] == "config":
 | 
					    if len(argv) > 1 and argv[1] == "config":
 | 
				
			||||||
        config = True
 | 
					        config = True
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user