Well, this is interesting, I'm looking forward how this will develop. Here is code review of some minor issues.
On Fri, Mar 13, 2015 at 1:24 PM, <[email protected]> wrote: > > + def loadSettings(self, sett=None): > + if sett: > + self.settings = sett > + > + try: > + self.database.SetValue(self.settings['database']) > + except: > + print 'err' > + pass > + try: > + self.schema.SetValue(self.settings['schema']) > + except: > + pass > + try: > + self.host.SetValue(self.settings['host']) > + except: > + pass > + try: > + self.user.SetValue(self.settings['user']) > + except: > + pass > + try: > + self.port.SetValue(self.settings['port']) > + except: > + pass > + try: > + self.passwd.SetValue(self.settings['passwd']) > + except: > + pass This should be one big try-except. Also, `except:` is a bad practice, this will catch everything including perhaps even SyntaxError. You should specify the error/exception type. You should also specify in the comment why it is OK to ignore the error. What you should use in case of `eval` that's a questions, more checks with `eval` is always a good idea. Also, please use if __name__ == '__main__': for consistency with other modules. This will allow you to import the files and avoid code duplication between wx.*.py file and g.gui.*.py in case the wx.*.py file is needed. Try to check your files with pep8 before submitting.
_______________________________________________ grass-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-dev
