Commit 100db90a authored by jay's avatar jay
Browse files

Fixes intermittent serialization issues #214

parent 8bc7a6c2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -83,6 +83,8 @@ class CandidateGraph(nx.Graph):
        self.graph['creationdate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime())
        self.graph['modifieddate'] = strftime("%Y-%m-%d %H:%M:%S", gmtime())

        self._order_adjacency()

    def __eq__(self, other):
        eq = True
        # Check the nodes
@@ -94,6 +96,9 @@ class CandidateGraph(nx.Graph):
                eq = False
        return eq

    def _order_adjacency(self):  # pragma: no cover
        self.adj = sorted(self.adj.items())

    @property
    def maxsize(self):
        if not hasattr(self, '_maxsize'):
@@ -222,8 +227,8 @@ class CandidateGraph(nx.Graph):
        ----------

        """

        raise NotImplementedError
        self._order_adjacency()

    def extract_features(self, band=1, *args, **kwargs):  # pragma: no cover
        """
+2 −0
Original line number Diff line number Diff line
@@ -126,4 +126,6 @@ def load(projectname):
                pass
            # Add a mock edge
            cg.edge[e['source']][e['target']] = edge

            cg._order_adjacency
    return cg