Skip to content
Snippets Groups Projects
Commit 6f53629ad273 authored by Augie Fackler's avatar Augie Fackler
Browse files

manifest: disallow setting the node id of an entry to None

manifest.diff() uses None as a special value to denote the absence of
a file, so setting a file node to None means you then can't trust
manifest.diff().

This should also make future manifest work slightly easier.
parent b1179dabc6de
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,9 @@
flags = {}
dict.__init__(self, mapping)
self._flags = flags
def __setitem__(self, k, v):
assert v is not None
dict.__setitem__(self, k, v)
def flags(self, f):
return self._flags.get(f, "")
def withflags(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment