Skip to content

Commit 89e1fc1

Browse files
committed
Test quick fix sio2project#1
1 parent e1474df commit 89e1fc1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/sinol_make/commands/init/__init__.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ def configure_subparser(self, subparser: argparse.ArgumentParser):
3737
parser.add_argument('-v', '--verbose', action='store_true')
3838
return parser
3939

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 ''
4343

4444
self.used_tmpdir = tempfile.TemporaryDirectory()
4545
tmp_dir = self.used_tmpdir.name
@@ -95,7 +95,6 @@ def update_task_id(self):
9595
def run(self, args: argparse.Namespace):
9696
self.task_id = args.task_id
9797
self.force = args.force
98-
self.template = args.template
9998
self.verbose = args.verbose
10099
destination = args.output or self.task_id
101100
if not os.path.isabs(destination):
@@ -108,7 +107,7 @@ def run(self, args: argparse.Namespace):
108107
f"Provide a different task id or directory name, "
109108
f"or use the --force flag to overwrite.")
110109
try:
111-
self.template_dir = self.download_template()
110+
self.template_dir = self.download_template(args.template)
112111

113112
os.chdir(destination)
114113

0 commit comments

Comments
 (0)