Package: PyHoca-GUI Version: 0.4.0.1
As discussed in the recent thread 'PyHoca-GUI 0.4.0.1 created bad config file' [1], I can create 'bad' files ~/.x2goclient/session essentially by just alternating between Add and Apply in the Profile Manager.
It seems like you are keying on name being unique. In which case you may need to test for it. I have not looked at your code (and I am not that fluent in Python) so this is just a guess.
x2go is a treat. Thanks for your work on it.
Cheers, Dirk
[1] http://thread.gmane.org/gmane.linux.terminal-server.x2go.user/1146