Fix the parse_patches() function to work with tuples
authorCatalin Marinas <catalin.marinas@gmail.com>
Thu, 5 Jun 2008 21:20:14 +0000 (22:20 +0100)
committerCatalin Marinas <catalin.marinas@gmail.com>
Thu, 5 Jun 2008 21:20:14 +0000 (22:20 +0100)
The series command passes a tuple to parse_patches instead of a patch list
(the new infrastructure) but there is no patch_list.index() function.
The patch transforms the tuple into a list.

Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/common.py

index 100b5e1..029ec65 100644 (file)
@@ -206,6 +206,8 @@ def parse_patches(patch_args, patch_list, boundary = 0, ordered = False):
     a list. The names can be individual patches and/or in the
     patch1..patch2 format.
     """
+    # in case it receives a tuple
+    patch_list = list(patch_list)
     patches = []
 
     for name in patch_args: