Prechádzať zdrojové kódy

Don't close file twice.

Jelmer Vernooij 16 rokov pred
rodič
commit
714631cfc2
1 zmenil súbory, kde vykonal 3 pridanie a 8 odobranie
  1. 3 8
      bin/dulwich

+ 3 - 8
bin/dulwich

@@ -166,14 +166,9 @@ def cmd_clone(args):
 	r = Repo(path)
 	graphwalker = SimpleFetchGraphWalker(r.heads().values(), r.get_parents)
 	f, commit = r.object_store.add_pack()
-	try:
-		client.fetch_pack(host_path, r.object_store.determine_wants_all, graphwalker, f.write, 
-				          sys.stdout.write)
-		f.close()
-		commit()
-	except:
-		f.close()
-		raise
+	client.fetch_pack(host_path, r.object_store.determine_wants_all, 
+			          graphwalker, f.write, sys.stdout.write)
+	commit()
 
 
 commands = {