Check a given package by calling aura security framework :param pkg: :return:
(pkg)
| 61 | |
| 62 | |
| 63 | def check_package(pkg): |
| 64 | """ |
| 65 | Check a given package by calling aura security framework |
| 66 | |
| 67 | :param pkg: |
| 68 | :return: |
| 69 | """ |
| 70 | import pprint |
| 71 | |
| 72 | pprint.pprint(pkg) |
| 73 | |
| 74 | print("\n*** Installation interrupted by apip ***") |
| 75 | |
| 76 | payload = json.dumps(pkg) |
| 77 | |
| 78 | p = subprocess.Popen( |
| 79 | shlex.split(AURA_PATH) + ["check_requirement"], |
| 80 | universal_newlines=True, |
| 81 | stdin=subprocess.PIPE |
| 82 | ) |
| 83 | p.communicate(payload) |
| 84 | p.stdin.close() |
| 85 | p.wait() |
| 86 | |
| 87 | if p.returncode > 0: |
| 88 | raise EnvironmentError("Installation aborted") |
| 89 | |
| 90 | |
| 91 | def mp_install_requirement( |
no test coverage detected