##// END OF EJS Templates
sshserver: Don't try to close fp if mkstemp failed
Thomas Arendsen Hein -
r6678:1eba8e8f default
parent child Browse files
Show More
@@ -167,7 +167,7 b' class sshserver(object):'
167 167 self.respond('')
168 168
169 169 # write bundle data to temporary file because it can be big
170
170 tempname = fp = None
171 171 try:
172 172 fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-')
173 173 fp = os.fdopen(fd, 'wb+')
@@ -198,7 +198,9 b' class sshserver(object):'
198 198 self.lock.release()
199 199 self.lock = None
200 200 finally:
201 if fp is not None:
201 202 fp.close()
203 if tempname is not None:
202 204 os.unlink(tempname)
203 205
204 206 def do_stream_out(self):
General Comments 0
You need to be logged in to leave comments. Login now