MCPcopy Index your code
hub / github.com/dashingsoft/pyarmor-webui / _create

Method _create

handler.py:529–549  ·  view source on GitHub ↗
(self, args, update=False)

Source from the content-addressed store, hash-verified

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)

Callers 2

do_newMethod · 0.95
do_updateMethod · 0.95

Calls 3

_get_pathMethod · 0.80
_format_pathMethod · 0.80
call_pyarmorFunction · 0.70

Tested by

no test coverage detected