File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,7 +347,7 @@ def dump_dirs(self, msg):
347347 opt_name = opt [0 ]
348348 if opt_name [- 1 ] == "=" :
349349 opt_name = opt_name [0 :- 1 ]
350- if self .negative_opt . has_key ( opt_name ) :
350+ if opt_name in self .negative_opt :
351351 opt_name = longopt_xlate (self .negative_opt [opt_name ])
352352 val = not getattr (self , opt_name )
353353 else :
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ def send_metadata(self):
125125 # see if we can short-cut and get the username/password from the
126126 # config
127127 config = None
128- if os . environ . has_key ( 'HOME' ) :
128+ if 'HOME' in os . environ :
129129 rc = os .path .join (os .environ ['HOME' ], '.pypirc' )
130130 if os .path .exists (rc ):
131131 print ('Using PyPI login from %s' % rc )
@@ -168,7 +168,7 @@ def send_metadata(self):
168168 print ('Server response (%s): %s' % (code , result ))
169169
170170 # possibly save the login
171- if os . environ . has_key ( 'HOME' ) and config is None and code == 200 :
171+ if 'HOME' in os . environ and config is None and code == 200 :
172172 rc = os .path .join (os .environ ['HOME' ], '.pypirc' )
173173 print ('I can store your PyPI login so future submissions will be faster.' )
174174 print ('(the login will be stored in %s)' % rc )
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ def finalize_options(self):
4545 raise DistutilsOptionError (
4646 "Must use --sign for --identity to have meaning"
4747 )
48- if os . environ . has_key ( 'HOME' ) :
48+ if 'HOME' in os . environ :
4949 rc = os .path .join (os .environ ['HOME' ], '.pypirc' )
5050 if os .path .exists (rc ):
5151 self .announce ('Using PyPI login from %s' % rc )
You can’t perform that action at this time.
0 commit comments