diff --git a/project.py b/project.py index b81fcd5f0..36039321f 100644 --- a/project.py +++ b/project.py @@ -4398,8 +4398,12 @@ class Project: except AttributeError: pass if line.startswith("ref: "): - return line[5:-1] - return line[:-1] + ref = line[5:-1] + else: + ref = line[:-1] + if ref == R_HEADS + ".invalid": + raise NoManifestException(path, str(e)) + return ref def SetHead(self, ref, message=None): cmdv = []