From ed360af83a547d565aea8c20d3086486c4c9491c Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 2 Feb 2017 09:00:35 -0500 Subject: Infer the username using getpass.getuser() if no username is resolved from .pypirc. --- setuptools/command/upload.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'setuptools/command') diff --git a/setuptools/command/upload.py b/setuptools/command/upload.py index 484baa5a..a44173a9 100644 --- a/setuptools/command/upload.py +++ b/setuptools/command/upload.py @@ -10,6 +10,10 @@ class upload(orig.upload): def finalize_options(self): orig.upload.finalize_options(self) + self.username = ( + self.username or + getpass.getuser() + ) # Attempt to obtain password. Short circuit evaluation at the first # sign of success. self.password = ( -- cgit v1.2.3