| @@ 5-16 (lines=12) @@ | ||
| 2 | import sys  | 
                                |
| 3 | ||
| 4 | ||
| 5 | def main():  | 
                                |
| 6 | client = oval_graph.client.client(sys.argv[1:])  | 
                                |
| 7 | rules = client.search_rules_id()  | 
                                |
| 8 | if len(rules) > 1:  | 
                                |
| 9 | answers = client.run_gui_and_return_answers()  | 
                                |
| 10 | if answers is None:  | 
                                |
| 11 |             print("You haven't got installed PyInquirer lib. " | 
                                |
| 12 | "Please copy id rule with you want use and put it in command")  | 
                                |
| 13 | else:  | 
                                |
| 14 | client.prepare_data(answers)  | 
                                |
| 15 | else:  | 
                                |
| 16 |         client.prepare_data({'rules': [rules[0]['id_rule']]}) | 
                                |
| 17 | ||
| 18 | ||
| 19 | if __name__ == '__main__':  | 
                                |
| @@ 5-16 (lines=12) @@ | ||
| 2 | import sys  | 
                                |
| 3 | ||
| 4 | ||
| 5 | def main():  | 
                                |
| 6 | client = oval_graph.client.client(sys.argv[1:])  | 
                                |
| 7 | rules = client.search_rules_id()  | 
                                |
| 8 | if len(rules) > 1:  | 
                                |
| 9 | answers = client.run_gui_and_return_answers()  | 
                                |
| 10 | if answers is None:  | 
                                |
| 11 |             print("You haven't got installed PyInquirer lib. " | 
                                |
| 12 | "Please copy id rule with you want use and put it in command")  | 
                                |
| 13 | else:  | 
                                |
| 14 | client.prepare_data(answers)  | 
                                |
| 15 | else:  | 
                                |
| 16 |         client.prepare_data({'rules': [rules[0]['id_rule']]}) | 
                                |
| 17 | ||
| 18 | ||
| 19 | if __name__ == '__main__':  | 
                                |