[Python-checkins] r43435 - in python/trunk: Doc/dist/dist.tex Lib/distutils/command/upload.py

Sjoerd Mullender sjoerd at acm.org
Thu Mar 30 10:49:25 CEST 2006


Neal Norwitz wrote:

>>Modified: python/trunk/Lib/distutils/command/upload.py
>>==============================================================================
>>--- python/trunk/Lib/distutils/command/upload.py        (original)
>>+++ python/trunk/Lib/distutils/command/upload.py        Thu Mar 30 04:12:14 2006
>>@@ -67,7 +73,10 @@
>>     def upload_file(self, command, pyversion, filename):
>>         # Sign if requested
>>         if self.sign:
>>-            spawn(("gpg", "--detach-sign", "-a", filename),
>>+            gpg_args = ["gpg", "--detach-sign", "-a", filename]
>>+            if self.identity:
>>+                gpg_args[2:2] = ["--local-user", self.identity]
>>+            spawn(gpg_args,
> 
> 
> Why do gpg_args[2:2] rather than gpg_args[2]?  You know the list is long enough.

The former inserts two values into the list, the latter overwrites an
entry with a new value.


-- 
Sjoerd Mullender
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 371 bytes
Desc: OpenPGP digital signature
Url : http://mail.python.org/pipermail/python-checkins/attachments/20060330/71375737/attachment.pgp 


More information about the Python-checkins mailing list