summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/upload.py
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2018-02-19 03:56:06 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2018-02-19 03:56:06 (GMT)
commiteeb33651bfadcceea68bd27bb4c4d8de2e690656 (patch)
tree1b5d884c5cd478c1834459c383ec48d5720ef0d0 /Lib/distutils/command/upload.py
parent21f53e7249d838489033abf4fc267bec00c1af3e (diff)
downloadcpython-eeb33651bfadcceea68bd27bb4c4d8de2e690656.zip
cpython-eeb33651bfadcceea68bd27bb4c4d8de2e690656.tar.gz
cpython-eeb33651bfadcceea68bd27bb4c4d8de2e690656.tar.bz2
[2.7] bpo-21060 Improve error message for "setup.py upload" without dist files (GH-5726).
(cherry picked from commit 08a6926b2584040fe3c3f06263b0b5f1fbbdc24c) Co-authored-by: Éric Araujo <merwok@netwok.org>
Diffstat (limited to 'Lib/distutils/command/upload.py')
-rw-r--r--Lib/distutils/command/upload.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py
index ea4b8a5..ff043d2 100644
--- a/Lib/distutils/command/upload.py
+++ b/Lib/distutils/command/upload.py
@@ -55,7 +55,9 @@ class upload(PyPIRCCommand):
def run(self):
if not self.distribution.dist_files:
- raise DistutilsOptionError("No dist file created in earlier command")
+ msg = ("Must create and upload files in one command "
+ "(e.g. setup.py sdist upload)")
+ raise DistutilsOptionError(msg)
for command, pyversion, filename in self.distribution.dist_files:
self.upload_file(command, pyversion, filename)