mercurial/util.py
changeset 50928 d718eddf01d9
parent 50753 a2df74853f8d
child 50929 18c8c18993f0
equal deleted inserted replaced
50927:7a8ea1397816 50928:d718eddf01d9
  2581             except OSError:
  2581             except OSError:
  2582                 pass
  2582                 pass
  2583             self._fp.close()
  2583             self._fp.close()
  2584 
  2584 
  2585     def __del__(self):
  2585     def __del__(self):
  2586         if safehasattr(self, '_fp'):  # constructor actually did something
  2586         if hasattr(self, '_fp'):  # constructor actually did something
  2587             self.discard()
  2587             self.discard()
  2588 
  2588 
  2589     def __enter__(self):
  2589     def __enter__(self):
  2590         return self
  2590         return self
  2591 
  2591