Author: bugman Date: Thu Dec 16 11:52:56 2010 New Revision: 11837 URL: http://svn.gna.org/viewcvs/relax?rev=11837&view=rev Log: The debugging flag now disables the execution locking mechanism. The acquire() and release() calls are also recorded in the 'lock.log' file to help with lock debugging. Modified: 1.3/status.py Modified: 1.3/status.py URL: http://svn.gna.org/viewcvs/relax/1.3/status.py?rev=11837&r1=11836&r2=11837&view=diff ============================================================================== --- 1.3/status.py (original) +++ 1.3/status.py Thu Dec 16 11:52:56 2010 @@ -85,6 +85,10 @@ # The name of the locker. self._name = None + # Debugging. + if __main__.debug: + self.log = open('lock.log', 'w') + def acquire(self, name): """Simulate the Lock.acquire() mechanism. @@ -96,12 +100,21 @@ # Store the name. self._name = name + # Debugging. + if __main__.debug: + self.log.write("Acquired by %s\n" % self._name) + return + # Acquire the real lock. return self._lock.acquire() def locked(self): """Simulate the Lock.locked() mechanism.""" + + # Debugging. + if __main__.debug: + return False # Call the real method. return self._lock.locked() @@ -113,5 +126,10 @@ # Reset the name. self._name = None + # Debugging. + if __main__.debug: + self.log.write("Release\n\n") + return + # Release the real lock. return self._lock.release()