Changeset d20823f


Ignore:
Timestamp:
May 3, 2010 10:01:19 AM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-3.01, version-3.02
Children:
e77c86e
Parents:
f3803ea
Message:

This is very odd. Defaulting reqs in the federated_service constructor
resulted in all the instances sharing a reqs member (they all pointed to the
same thing). That's pretty non-intuitive, but seems to be the way python does
default parameter initialization. Beware.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    rf3803ea rd20823f  
    5252        self.params = params
    5353        self.reqs = reqs
     54
     55    def __str__(self):
     56        return "name %s export %s import %s params %s reqs %s" % \
     57                (self.name, self.exporter, self.importers, self.params,
     58                        [ (r['name'], r['visibility']) for r in self.reqs] )
    5459
    5560class experiment_control_local:
     
    17121717                        masters[tb].append(federated_service(name=s['name'],
    17131718                                exporter=tb, importers=s.get('import',[]),
    1714                                 params=params))
     1719                                params=params, reqs=[]))
    17151720                    else:
    17161721                        self.log.error('Testbed service does not have name " + \
Note: See TracChangeset for help on using the changeset viewer.