Returns the install names list. The known-good file is expected to be in the same directory as this script unless overridden by the 'known_good_dir' parameter.
(args)
| 584 | |
| 585 | |
| 586 | def GetInstallNames(args): |
| 587 | """Returns the install names list. |
| 588 | |
| 589 | The known-good file is expected to be in the same |
| 590 | directory as this script unless overridden by the 'known_good_dir' |
| 591 | parameter. |
| 592 | """ |
| 593 | if args.known_good_dir: |
| 594 | known_good_file = os.path.join(os.path.abspath(args.known_good_dir), |
| 595 | KNOWN_GOOD_FILE_NAME) |
| 596 | else: |
| 597 | known_good_file = os.path.join( |
| 598 | os.path.dirname(os.path.abspath(__file__)), KNOWN_GOOD_FILE_NAME) |
| 599 | with open(known_good_file) as known_good: |
| 600 | install_info = json.loads(known_good.read()) |
| 601 | if install_info.get('install_names'): |
| 602 | return install_info['install_names'] |
| 603 | else: |
| 604 | return None |
| 605 | |
| 606 | |
| 607 | def CreateHelper(args, repos, filename): |