1.1 --- a/imiptools/content.py Thu Dec 18 23:24:56 2014 +0100
1.2 +++ b/imiptools/content.py Thu Dec 18 23:59:30 2014 +0100
1.3 @@ -488,10 +488,12 @@
1.4
1.5 old_dtstamp = self.dtstamp < dtstamp
1.6
1.7 - if sequence is not None and self.sequence is not None and (
1.8 + have_sequence = sequence is not None and self.sequence is not None
1.9 +
1.10 + if have_sequence and (
1.11 int(self.sequence) < int(sequence) or
1.12 int(self.sequence) == int(sequence) and old_dtstamp
1.13 - ) or old_dtstamp:
1.14 + ) or not have_sequence and old_dtstamp:
1.15
1.16 return False
1.17