(self, args, update=False)
| 527 | return args |
| 528 | |
| 529 | def _create(self, args, update=False): |
| 530 | path = self._get_path() |
| 531 | output = self._format_path(args.get('output', path)) |
| 532 | |
| 533 | rcode = args['rcode'] |
| 534 | filename = os.path.join(output, rcode, 'license.lic') |
| 535 | if os.path.exists(filename) and not update: |
| 536 | raise RuntimeError('The license "%s" already exists' % rcode) |
| 537 | |
| 538 | cmd_args = ['licenses', '--output', output] |
| 539 | for name, opt in self.options.items(): |
| 540 | if name in args: |
| 541 | v = args.get(name) |
| 542 | if v: |
| 543 | cmd_args.append(opt) |
| 544 | if name not in self.switch_option_names: |
| 545 | cmd_args.append(v) |
| 546 | cmd_args.append(rcode) |
| 547 | |
| 548 | call_pyarmor(cmd_args) |
| 549 | return filename |
| 550 | |
| 551 | def do_update(self, args): |
| 552 | c, p = self._get_license(args) |
no test coverage detected