diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2017-05-08 23:46:36 +0300 |
---|---|---|
committer | muvarov <muvarov@gmail.com> | 2017-05-09 03:17:00 +0300 |
commit | 791a54228a6208442d51ea886c2f2172b081c01c (patch) | |
tree | 695e18f79ea064f72ee6f90f46d12e3e7f748f4e | |
parent | 1acb99b8f071415f5e88671684234e4c5220ce9b (diff) |
Sort patches in the right order
glob.glob() uses 'native' sorting order. Sort the list according to the file name. For the reference see https://stackoverflow.com/questions/6773584/how-is-pythons-glob-glob-ordered
-rwxr-xr-x | gh-mail-pr.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gh-mail-pr.py b/gh-mail-pr.py index c208f7f..330830c 100755 --- a/gh-mail-pr.py +++ b/gh-mail-pr.py @@ -42,7 +42,7 @@ def fix_patch(f, hdr, i, tlen): def fix_headers(hdr): print "Fix hdr with hdr %s\n" % hdr - pfiles = glob.glob("./to_send-p*.patch") + pfiles = sorted(glob.glob("./to_send-p*.patch")) i = 0 for f in pfiles: i = i + 1 |