The unified diff between revisions [92eb8752..] and [14e5fc76..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'branchdiv.py'

#
#
# patch "branchdiv.py"
#  from [5fbaaeb9d3050ab0f510c34b4ccfe18e7fda89a1]
#    to [49a419788c7b54eed260b770c7a89066da499c1f]
#
============================================================
--- branchdiv.py	5fbaaeb9d3050ab0f510c34b4ccfe18e7fda89a1
+++ branchdiv.py	49a419788c7b54eed260b770c7a89066da499c1f
@@ -8,14 +8,21 @@ from mk2 import MarkovChain
 # PURPOSE.

 from mk2 import MarkovChain
+import sys

+# it's hardly worth doing anything in this case..
+min_to_divide = 20
+
 class BranchDivisions(object):
     def __init__ (self):
         self.divisions = None

     def calculate_divisions (self, branches):
-        if self.divisions != None:
+        if not self.divisions is None:
             return
+        if len(branches) < 20:
+            self.divisions = []
+            return
         chain = MarkovChain (2, join_token='.', cutoff_func=MarkovChain.log_chunkable)
         for branch in branches:
             chain.update (branch.name.split ('.'))