Commit 3944f211 authored by Jim Fulton's avatar Jim Fulton

Fixed to handle null (empty or None) specifications.

parent d01f9b40
...@@ -88,11 +88,13 @@ ...@@ -88,11 +88,13 @@
class UndoLogCompatible: class UndoLogCompatible:
def undoInfo(self, first, last, specification): def undoInfo(self, first, last, specification):
if specification:
def filter(desc, spec=specification.items()): def filter(desc, spec=specification.items()):
get=desc.get get=desc.get
for k, v in spec: for k, v in spec:
if get(k, None) != v: if get(k, None) != v:
return 0 return 0
return 1 return 1
else: filter=None
return self.undoLog(first, last, filter) return self.undoLog(first, last, filter)
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