We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 378e6a3 commit d38e6feCopy full SHA for d38e6fe
util/upload-cfn-templates.py
@@ -32,7 +32,7 @@ def get_template_extension(templates_dir, template_name):
32
"Found 0 or multiple matching files for template name {}: {}".format(template_name, matching_files)
33
)
34
file_name = os.path.basename(matching_files[0])
35
- extension = file_name[len(template_name) :] # noqa: E203
+ extension = os.path.splitext(file_name)[1]
36
if extension not in {".cfn.json", ".cfn.yaml"}:
37
raise Exception("Found invalid extension for template {}: {}".format(template_name, extension))
38
return extension
0 commit comments