Let parse_patch take a string instead of a file parameter
[stgit] / stgit / commands / edit.py
index 4d1475f..65b54d9 100644 (file)
@@ -100,7 +100,8 @@ def __update_patch(pname, fname, options):
         f = sys.stdin
     else:
         f = open(fname)
-    message, author_name, author_email, author_date, diff = parse_patch(f)
+    (message, author_name, author_email, author_date, diff
+     ) = parse_patch(f.read())
     f.close()
 
     out.start('Updating patch "%s"' % pname)