11"""
22This is the main rdopkg action module with actions for distgit management.
33"""
4-
4+ from __future__ import print_function
55import itertools
66import os
77import re
8+ import six
89import sys
910
1011from rdopkg .conf import cfg , cfg_files
1920from rdopkg .utils import tidy_ssh_user
2021from rdopkg import helpers
2122
22-
2323FEDPKG = ['fedpkg' ]
2424
2525
@@ -112,13 +112,13 @@ def _putv(title, val):
112112 spec = specfile .Spec ()
113113 vr = spec .get_vr ()
114114 patches_apply_method = spec .patches_apply_method ()
115- print
115+ print ( '' )
116116 _putv ('Package: ' , package )
117117 _putv ('VR: ' , vr )
118118 _putv ('Version: ' , version )
119119 _putv ('Upstream: ' , upstream_version )
120120 _putv ('Tag style:' , version_tag_style or 'X.Y.Z' )
121- print
121+ print ( '' )
122122 _putv ('Patches style: ' , patches_style )
123123 _putv ('Dist-git branch: ' , branch )
124124 _putv ('Local patches branch: ' ,
@@ -129,7 +129,7 @@ def _putv(title, val):
129129 '%s : %s' % (upstream_branch , upstream_str ))
130130 if patches_style == 'review' :
131131 _putv ('Patches chain: ' , gerrit_review_url )
132- print
132+ print ( '' )
133133 _putv ('OS dist: ' , osdist )
134134 _putv ('Patches apply method: ' , patches_apply_method )
135135
@@ -759,9 +759,9 @@ def _filter(check, stacker):
759759
760760 buckets = []
761761 stacker = _stacker (buckets )
762- stacker .next ()
762+ six .next (stacker )
763763 filter = _filter (take , stacker )
764- filter .next ()
764+ six .next (filter )
765765
766766 for patch in patches :
767767 filter .send (patch )
@@ -783,8 +783,9 @@ def update_patches(branch, local_patches_branch,
783783 action = 'update_patches' ,
784784 arg = 'version or new_version' )
785785 tag = guess .version2tag (target_version , version_tag_style )
786+
786787 _ensure_branch (local_patches_branch )
787- patches = git .get_commits (tag , local_patches_branch )
788+ patches = list ( git .get_commits (tag , local_patches_branch ) )
788789 n_patches = len (patches )
789790 _ensure_branch (branch )
790791 spec = specfile .Spec ()
0 commit comments