mercurial/windows.py
changeset 14004 97ed99d1f419
parent 13986 9c374cf76b7d
child 14064 e4bfb9c337f3
equal deleted inserted replaced
14003:ba734ff5cadd 14004:97ed99d1f419
    30         return getattr(self.fp, key)
    30         return getattr(self.fp, key)
    31 
    31 
    32     def close(self):
    32     def close(self):
    33         try:
    33         try:
    34             self.fp.close()
    34             self.fp.close()
    35         except: pass
    35         except IOError:
       
    36             pass
    36 
    37 
    37     def write(self, s):
    38     def write(self, s):
    38         try:
    39         try:
    39             # This is workaround for "Not enough space" error on
    40             # This is workaround for "Not enough space" error on
    40             # writing large size of data to console.
    41             # writing large size of data to console.
   241     while head and tail:
   242     while head and tail:
   242         try:
   243         try:
   243             if osutil.listdir(head):
   244             if osutil.listdir(head):
   244                 return
   245                 return
   245             os.rmdir(head)
   246             os.rmdir(head)
   246         except:
   247         except (ValueError, OSError):
   247             break
   248             break
   248         head, tail = os.path.split(head)
   249         head, tail = os.path.split(head)
   249 
   250 
   250 def unlinkpath(f):
   251 def unlinkpath(f):
   251     """unlink and remove the directory if it is empty"""
   252     """unlink and remove the directory if it is empty"""