@@ -37,9 +37,9 @@ def configure_subparser(self, subparser: argparse.ArgumentParser):
37
37
parser .add_argument ('-v' , '--verbose' , action = 'store_true' )
38
38
return parser
39
39
40
- def download_template (self ):
41
- template = self . template [0 ]
42
- subdir = self . template [1 ] if len (self . template ) > 1 else ''
40
+ def download_template (self , template_paths = [ DEFAULT_TEMPLATE , DEFAULT_SUBDIR ] ):
41
+ template = template_paths [0 ]
42
+ subdir = template_paths [1 ] if len (template_paths ) > 1 else ''
43
43
44
44
self .used_tmpdir = tempfile .TemporaryDirectory ()
45
45
tmp_dir = self .used_tmpdir .name
@@ -95,7 +95,6 @@ def update_task_id(self):
95
95
def run (self , args : argparse .Namespace ):
96
96
self .task_id = args .task_id
97
97
self .force = args .force
98
- self .template = args .template
99
98
self .verbose = args .verbose
100
99
destination = args .output or self .task_id
101
100
if not os .path .isabs (destination ):
@@ -108,7 +107,7 @@ def run(self, args: argparse.Namespace):
108
107
f"Provide a different task id or directory name, "
109
108
f"or use the --force flag to overwrite." )
110
109
try :
111
- self .template_dir = self .download_template ()
110
+ self .template_dir = self .download_template (args . template )
112
111
113
112
os .chdir (destination )
114
113
0 commit comments