[Reportbug-commits] [reportbug] 16/38: Preserve given order of attachments
Sandro Tosi
morph at moszumanska.debian.org
Fri Dec 29 04:33:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
morph pushed a commit to branch master
in repository reportbug.
commit e38379447d4b8f8bcc22f9bb0a4dc5dbb9b59d84
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Oct 14 15:34:33 2017 +0300
Preserve given order of attachments
While at it, avoids modifying a list while iterating over it.
---
bin/reportbug | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/bin/reportbug b/bin/reportbug
index 9c91b43..61e54ab 100755
--- a/bin/reportbug
+++ b/bin/reportbug
@@ -1025,12 +1025,11 @@ def main():
sys.exit(1)
if options.attachments:
- # needed to support glob
+ # support glob
+ globbed_attachments = []
for attachment in options.attachments:
- # remove each element
- options.attachments.remove(attachment)
- # and replace it with its glob
- options.attachments.extend(glob(attachment))
+ globbed_attachments.extend(glob(attachment))
+ options.attachments = globbed_attachments
any_missing = False
for attachment in options.attachments:
if not os.path.exists(os.path.expanduser(attachment)):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reportbug/reportbug.git
More information about the Reportbug-commits
mailing list