mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-35416: fix potential resource warnings in distutils (GH-10918)
This commit is contained in:
parent
7a0630c530
commit
58721a9030
4 changed files with 41 additions and 36 deletions
|
|
@ -125,8 +125,9 @@ class upload(PyPIRCCommand):
|
|||
data['comment'] = ''
|
||||
|
||||
if self.sign:
|
||||
data['gpg_signature'] = (os.path.basename(filename) + ".asc",
|
||||
open(filename+".asc", "rb").read())
|
||||
with open(filename + ".asc", "rb") as f:
|
||||
data['gpg_signature'] = (os.path.basename(filename) + ".asc",
|
||||
f.read())
|
||||
|
||||
# set up the authentication
|
||||
user_pass = (self.username + ":" + self.password).encode('ascii')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue