2010/5/22 Rob Healey <robhealey1@gmail.com>
Greetings All:

I know that this bug has existed for a while now, but I have finally gotten to it...  I know that gramps32 branch is in maintenance now, but I think this is a pretty major of a bug that needed to be fixed for 3.2.4 if their is to be one....

Here is the bug tracker for it...

Now, I have had this running on my system for a while now and I have not come up with any errors yet.  There is two screen shots and a patch file attached to the tracker.  There is also instructions on how to reproduce it...

Give me the ok and I will commit it....


Please do the following:

1. you change a function that normally obtains text, to a function that can obtain text or text as 4-tuple that must be parsed. Please change this function to obtain a parameter formatdata, which should be a tuple, then everywhere where used parse the tuple. The parameter should not be called 'text' anymore, and the doc strings should be updated.
I really don't like the idea of a variable text that can be two things. Can this really not be solved more cleanly, eg two functions, ... ? Without studying the code I can say little about it.

2. run pylint on the code. At least for trunk, remove the obvious problems in the pylint output.

For branch32 you should try to investigate if a more simple fix is not possible. Eg, you move a function to a class method. In maintenance this should best be avoided. The reason you need this is because to parse the tuple, you need other class methods. By doing that, the original function cannot operate as function anymore. I would think that ideally it should be possible to have class methods that determine the text that must be printed, and a function to do the actual writing on the backend, but then obviously real text must be passed. Again, without investigating the code I can say little about alternatives.
Perhaps the following is most logical: pass the function a list of text fields, one for every year that must be printed. If the text is not a list, then the same text must printed for every year. That seems like an easy to maintain paradigm. So the function woul expect text to be instance list or a string, and always to the same, so not format the text anymore. When calling the function, the caller constructs the correct list of text.

I agree the bug must be fixed in 3.2.4


Sincerely yours,
Rob G. Healey


Gramps-devel mailing list