From d60ba5277cf528e7335a7c044959a5e5905d1862 Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Sun, 16 Apr 2017 02:56:31 -0700 Subject: [PATCH] Remove a crash-causing line in slipnet.py. Without this patch, `python main.py abc aabbcc milk` will reliably crash. I believe what happens here is that we initialize all the slipnodes and everything, and then `slipnet.predecessor` becomes `None`, which means that if that concept ever arises on its own (vs. arising as the "opposite" of "successor"), we'll be passing around `None` instead of a proper `Slipnode` and everything goes sideways. This line doesn't correspond obviously to anything in the Java code, so I think it's just bogus --- an experiment in "brain damage" that was accidentally committed? --- copycat/slipnet.py | 1 - 1 file changed, 1 deletion(-) diff --git a/copycat/slipnet.py b/copycat/slipnet.py index 0da9916..fcaa00f 100644 --- a/copycat/slipnet.py +++ b/copycat/slipnet.py @@ -27,7 +27,6 @@ class SlipNet(object): self.numberOfUpdates = 0 self.__addInitialNodes() self.__addInitialLinks() - self.predecessor = None def __repr__(self): return ''