mercurial/commands.py
changeset 1971 915b81a35e46
parent 1970 119165543ce6
child 1972 ce127cb4ee6e
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1811,7 +1811,7 @@ def incoming(ui, repo, source="default",
             ui.write("\n")
 
     if cleanup:
-        os.close(fd)
+        other.close()                   # explicit close for unlink
         os.unlink(cleanup)
 
 def init(ui, dest="."):