summaryrefslogtreecommitdiff
path: root/setuptools/command/upload.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2017-02-23 16:40:30 -0500
committerGitHub <noreply@github.com>2017-02-23 16:40:30 -0500
commit776bf48ad86c29e5b2ae8184a0c47fb25e542cc7 (patch)
tree6dfa2e121cf70aca7b84cd9db79b9b0034d29a4b /setuptools/command/upload.py
parent5c80844b0291ef2b326bcf8cf79e9a69dbd01a6b (diff)
parentd2adf3daa1206b9950b5185fb0a56b6ea84658e3 (diff)
downloadpython-setuptools-git-776bf48ad86c29e5b2ae8184a0c47fb25e542cc7.tar.gz
Merge pull request #961 from pypa/feature/upload-infer-username
In upload, infer the username using getpass.getuser()
Diffstat (limited to 'setuptools/command/upload.py')
-rw-r--r--setuptools/command/upload.py4
1 files changed, 4 insertions, 0 deletions
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 = (