Commit 2aecf378 authored by Jim Mussared's avatar Jim Mussared Committed by Damien George

tools/makemanifest.py: Add check that freeze path is a directory.

Avoids accidentally writing

    freeze("path/to/file.py")

and getting unexpected results.
parent 499e199a
......@@ -172,6 +172,8 @@ def mkdir(filename):
def freeze_internal(kind, path, script, opt):
path = convert_path(path)
if not os.path.isdir(path):
raise FreezeError("freeze path must be a directory")
if script is None and kind == KIND_AS_STR:
if any(f[0] == KIND_AS_STR for f in manifest_list):
raise FreezeError("can only freeze one str directory")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment