Exemple #1
0
    def __init__(self, scenario):
        """
        Initialization of a generic viewer object.

        @param  scenario        The ScenarioRunner object this viewer object is part of.
        """
        viewer.__init__(self, scenario)
    def __init__(self, scenario):
        """
        Initialization of a generic viewer object.

        @param  scenario        The ScenarioRunner object this viewer object is part of.
        """
        viewer.__init__(self, scenario)
        # TODO: Your initialization, if any (not likely). Oh, and remove the next line.
        raise Exception( "DO NOT instantiate the skeleton implementation" )
    def __init__(self, scenario):
        """
        Initialization of a generic viewer object.

        @param  scenario        The ScenarioRunner object this viewer object is part of.
        """
        viewer.__init__(self, scenario)
        if not htmlcollection.convert:
            if os.path.exists( '/bin/convert' ):
                htmlcollection.convert = '/bin/convert'
            elif os.path.exists( '/usr/bin/convert' ):
                htmlcollection.convert = '/usr/bin/convert'
            else:
                out, _ = Popen( 'which convert', stdout = PIPE, shell = True ).communicate()
                if out is None or out == '' or not os.path.exists( 'out' ):
                    Campaign.logger.log( "viewer:htmlcollection could not find the convert utility. Images will not be presented nicely shrunk. Please install ImageMagick to have better functionality." )
                else:
                    htmlcollection.convert = out