| @@ -418,6 +418,7 @@ class ObjectStore(object): | |||||
| #if oldobj.modified > obj.modified: | #if oldobj.modified > obj.modified: | ||||
| # return | # return | ||||
| if oldobj is not None: | if oldobj is not None: | ||||
| # XXX - missing cleanup of indexes | |||||
| session.delete(oldobj) | session.delete(oldobj) | ||||
| sobj = orm.MetaDataObject(uuid=obj.uuid, type=obj.type, | sobj = orm.MetaDataObject(uuid=obj.uuid, type=obj.type, | ||||
| @@ -1278,7 +1279,7 @@ def handle_bittorrent(fname, persona, objstr): | |||||
| except KeyError: | except KeyError: | ||||
| pass | pass | ||||
| else: | else: | ||||
| if not 'incomplete' in cont: | |||||
| if 'incomplete' not in cont: | |||||
| print('Warning, container already complete, skipping %s.' % repr(fname), file=sys.stderr) | print('Warning, container already complete, skipping %s.' % repr(fname), file=sys.stderr) | ||||
| return | return | ||||
| @@ -2405,3 +2406,8 @@ class _TestCases(unittest.TestCase): | |||||
| # and outputs an error message | # and outputs an error message | ||||
| self.assertEqual(stderr.getvalue(), | self.assertEqual(stderr.getvalue(), | ||||
| 'ERROR: file not found: \'foo\'\n') | 'ERROR: file not found: \'foo\'\n') | ||||
| # Tests to add: | |||||
| # dump mappings (mappings with no args) | |||||
| # expand mappings to multiple mappings, that is a -> b, b -> c, implies a -> c | |||||
| # support host names in --create | |||||