~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lazy_import.py

  • Committer: Benoît Pierre
  • Date: 2011-10-10 20:55:52 UTC
  • mto: This revision was merged to the branch mainline in revision 6215.
  • Revision ID: benoit.pierre@gmail.com-20111010205552-7o6qoaiihy31hhxb
Avoid prompt duplication for shelf_ui tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
 
99
99
    def _cleanup(self):
100
100
        """Stop holding on to all the extra stuff"""
101
 
        del self._factory
102
 
        del self._scope
 
101
        try:
 
102
            del self._factory
 
103
        except AttributeError:
 
104
            # Oops, we just lost a race with another caller of _cleanup.  Just
 
105
            # ignore it.
 
106
            pass
 
107
 
 
108
        try:
 
109
            del self._scope
 
110
        except AttributeError:
 
111
            # Another race loss.  See above.
 
112
            pass
 
113
 
103
114
        # We keep _name, so that we can report errors
104
115
        # del self._name
105
116