Changeset 2f14616 for fedd


Ignore:
Timestamp:
Aug 3, 2009 2:03:01 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
version-1.30
Children:
3cbf9eb
Parents:
59f3d1f
Message:

Multi info was all screwed up if the requester wasn't authorized to see any one
of the experiments. This gracefully handles the exceptions that
check_experiment_access throws as well as making some threading.Locks
threading.RLocks to head off the coming deadlocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r59f3d1f r2f14616  
    5353            """
    5454            self.ll = l
    55             self.lock = Lock()
     55            self.lock = RLock()
    5656        def write(self, str):
    5757            """
     
    262262
    263263        self.state = { }
    264         self.state_lock = Lock()
     264        self.state_lock = RLock()
    265265        self.tclsh = "/usr/local/bin/otclsh"
    266266        self.tcl_splitter = config.get("splitter", "tcl_splitter") or \
     
    23032303        self.state_lock.acquire()
    23042304        for key in [ k for k in self.state.keys() if isinstance(k, fedid)]:
    2305             self.check_experiment_access(fid, key)
     2305            try:
     2306                self.check_experiment_access(fid, key)
     2307            except service_error, e:
     2308                if e.code == service_error.access:
     2309                    continue
     2310                else:
     2311                    self.state_lock.release()
     2312                    raise e
    23062313
    23072314            if self.state.has_key(key):
Note: See TracChangeset for help on using the changeset viewer.