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):
def filter(desc, spec=specification.items()): if specification:
get=desc.get def filter(desc, spec=specification.items()):
for k, v in spec: get=desc.get
if get(k, None) != v: for k, v in spec:
return 0 if get(k, None) != v:
return 1 return 0
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