Factor out code common for extensions
This commit is contained in:
@@ -18,6 +18,7 @@ logg = logging.getLogger(__name__)
|
||||
|
||||
def process_args(argparser):
|
||||
argparser.add_argument('-d', '--directory', type=str, dest='directory', default='.', help='directory')
|
||||
argparser.add_argument('-o', '--output-directory', type=str, dest='output_directory', help='output directory')
|
||||
argparser.add_argument('-y', '--signer', type=str, dest='y', help='target-specific signer to use for export')
|
||||
argparser.add_argument('-p', type=str, help='RPC endpoint')
|
||||
argparser.add_argument('target', type=str, help='target network type')
|
||||
@@ -80,4 +81,5 @@ def execute(config, eargs):
|
||||
c.apply_token(ct)
|
||||
|
||||
p = Processor(proof=cp, attachment=ca, metadata=cm, extensions=[eargs.target])
|
||||
c.process(writer=writers['ext'])
|
||||
|
||||
c.process(writer=writers['ext'](path=eargs.output_directory))
|
||||
|
||||
Reference in New Issue
Block a user