On 2010-09-23, Leo Simons wrote:

> I had some fun trying to dig through the codebase to try and remember
> what's what...hoo boy, this certainly isn't how I'd write python code
> today :)

The Gump code base is a collection of "first Python project of a Java
programmer" pieces from three or four people.

> Nevertheless I think it may be safe to disable

>         # Add Historical Database storer -- ??? no such thing...
>         if self.run.getOptions().isOfficial() and \
>             self.run.getWorkspace().hasDatabaseInformation() and \
>             self.run.getOptions().isHistorical():
>             try:
>                 import gump.actor.history.historical
>                 self.run.registerActor(
>                   gump.actor.history.historical.Historical(self.run))
>             except Exception, details:
>                 self.log.warning(
>                   'Unable to register Historical Database Actor :  %s '
>                             % details,
>                             exc_info=1)

>         # Add Dynagump database populator
>         if self.run.getWorkspace().hasDatabaseInformation():
>             # create the database helper
>             dbInfo = self.run.getWorkspace().getDatabaseInformation()
>             from gump.util.mysql import Database
>             database = Database(dbInfo)

>             # now create the Dynagumper using that database
>             import gump.actor.mysql.dynagumper
>             self.run.registerActor(
>               gump.actor.mysql.dynagumper.Dynagumper(self.run,database))

> in

> https://svn.apache.org/repos/asf/gump/trunk/python/gump/core/runner/runner.py

Agreed.

> that may help get rid of some confusing warnings?

We used to get funny error messages when isHistorical returned true on
the FreeBSD machine since there have been two isHistorical methods in
the same class and it depended on the platform which of the two methods
was called[1].  This is why I like compilers to catch my errors and have
made a habit out of running pylint on python code before I check it in.

Dynagumper is a an actor that doesn't do anything so it doesn't hurt too
much either.

Stefan

[1] 
http://svn.apache.org/viewvc/gump/trunk/python/gump/core/run/options.py?r1=988801&r2=988804

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscr...@gump.apache.org
For additional commands, e-mail: general-h...@gump.apache.org

Reply via email to