Greetings<br>I hash some objects and it works fine when I set and get them. However, when I move the Data.fs to a different server on a separate machine running exactly the same code, the hashes don't match.<br><br>Here's the code:
<br>(I tried the paste bin, but it was done at the moment)<br>class JournalContainer(btree.BTreeContainer):<br> """Container of Journals"""<br><br> implements(interfaces.IJournalContainer
)<br><br> def __init__(self):<br> super(JournalContainer, self).__init__()<br> self._index = persistent.dict.PersistentDict()<br><br> def add(self, journal, person, section):<br> chooser = INameChooser(self)
<br> name = chooser.chooseName('',journal)<br> self[name] = journal<br> personHash = hash(IKeyReference(person, None))<br> sectionHash = hash(IKeyReference(section, None))<br> self._index[(personHash, sectionHash)] = journal
<br><br> def getJournal(self, person, section):<br> import pdb;pdb.set_trace()<br> personHash = hash(IKeyReference(person, None))<br> sectionHash = hash(IKeyReference(section, None))<br> return self._index.get((personHash, sectionHash), None)
<br><br> def remove(self, person, section):<br> del self[self.getJournal(person, section).__name__]<br> personHash = hash(IKeyReference(person, None))<br> sectionHash = hash(IKeyReference(section, None))
<br> del self._index[(personHash, sectionHash)]<br><br><br>What are we doing wrong/What is causing the problem? How should we go about fixing this.<br><br>Thank you very much.<br>-Eldar Omuraliev<br>