summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2003-02-19 13:49:35 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2003-02-19 13:49:35 (GMT)
commit23c98c5f47f976edd37eec5efe09fd3847e464cf (patch)
tree7dc4c78ab82ca299c8e15f801c9e2775a648c1d5 /Lib/distutils/command
parent3749507296a6c5b2ab8ceaf7ffbb1a284094d598 (diff)
downloadcpython-23c98c5f47f976edd37eec5efe09fd3847e464cf.zip
cpython-23c98c5f47f976edd37eec5efe09fd3847e464cf.tar.gz
cpython-23c98c5f47f976edd37eec5efe09fd3847e464cf.tar.bz2
[Patch #684398] Rename verbose argument to show-response; don't conditionalize the get_classifiers() call
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/register.py17
1 files changed, 8 insertions, 9 deletions
diff --git a/Lib/distutils/command/register.py b/Lib/distutils/command/register.py
index aac700c..328d8d0 100644
--- a/Lib/distutils/command/register.py
+++ b/Lib/distutils/command/register.py
@@ -26,15 +26,15 @@ class register(Command):
'verify the package metadata for correctness'),
('list-classifiers', None,
'list the valid Trove classifiers'),
- ('verbose', None,
- 'display full response from server'),
+ ('show-response', None,
+ 'display full response text from server'),
]
- boolean_options = ['verify', 'verbose', 'list-classifiers']
+ boolean_options = ['verify', 'show-response', 'list-classifiers']
def initialize_options(self):
self.repository = None
self.verify = 0
- self.verbose = 0
+ self.show_response = 0
self.list_classifiers = 0
def finalize_options(self):
@@ -232,9 +232,8 @@ Your selection [default 1]: ''',
'description': meta.get_long_description(),
'keywords': meta.get_keywords(),
'platform': meta.get_platforms(),
+ 'classifiers': meta.get_classifiers(),
}
- if hasattr(meta, 'classifiers'):
- data['classifiers'] = meta.get_classifiers()
return data
def post_to_server(self, data, auth=None):
@@ -277,16 +276,16 @@ Your selection [default 1]: ''',
try:
result = opener.open(req)
except urllib2.HTTPError, e:
- if self.verbose:
+ if self.show_response:
data = e.fp.read()
result = e.code, e.msg
except urllib2.URLError, e:
result = 500, str(e)
else:
- if self.verbose:
+ if self.show_response:
data = result.read()
result = 200, 'OK'
- if self.verbose:
+ if self.show_response:
print '-'*75, data, '-'*75
return result