gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: vmgump2
Date Fri, 24 Sep 2010 12:34:48 GMT
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-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message