@@ -26,15 +26,15 @@ class register(Command):
2626 'verify the package metadata for correctness' ),
2727 ('list-classifiers' , None ,
2828 'list the valid Trove classifiers' ),
29- ('verbose ' , None ,
30- 'display full response from server' ),
29+ ('show-response ' , None ,
30+ 'display full response text from server' ),
3131 ]
32- boolean_options = ['verify' , 'verbose ' , 'list-classifiers' ]
32+ boolean_options = ['verify' , 'show-response ' , 'list-classifiers' ]
3333
3434 def initialize_options (self ):
3535 self .repository = None
3636 self .verify = 0
37- self .verbose = 0
37+ self .show_response = 0
3838 self .list_classifiers = 0
3939
4040 def finalize_options (self ):
@@ -232,9 +232,8 @@ def build_post_data(self, action):
232232 'description' : meta .get_long_description (),
233233 'keywords' : meta .get_keywords (),
234234 'platform' : meta .get_platforms (),
235+ 'classifiers' : meta .get_classifiers (),
235236 }
236- if hasattr (meta , 'classifiers' ):
237- data ['classifiers' ] = meta .get_classifiers ()
238237 return data
239238
240239 def post_to_server (self , data , auth = None ):
@@ -277,16 +276,16 @@ def post_to_server(self, data, auth=None):
277276 try :
278277 result = opener .open (req )
279278 except urllib2 .HTTPError , e :
280- if self .verbose :
279+ if self .show_response :
281280 data = e .fp .read ()
282281 result = e .code , e .msg
283282 except urllib2 .URLError , e :
284283 result = 500 , str (e )
285284 else :
286- if self .verbose :
285+ if self .show_response :
287286 data = result .read ()
288287 result = 200 , 'OK'
289- if self .verbose :
288+ if self .show_response :
290289 print '-' * 75 , data , '-' * 75
291290 return result
292291
0 commit comments