Skip to content

Commit efc9fb7

Browse files
authored
Fix the refleaks by not creating an instance of OSError
1 parent 80ea3a1 commit efc9fb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Lib/test/test_ftplib.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ def test_cli_retrieve_file(self, mock_netrc, mock_ftp_cls):
12531253
mock_ftp.quit.assert_called_once()
12541254

12551255
@mock.patch('ftplib.FTP')
1256-
@mock.patch('netrc.netrc', side_effect=OSError('file not found'))
1256+
@mock.patch('netrc.netrc', side_effect=OSError)
12571257
def test_cli_custom_rcfile_error(self, mock_netrc, mock_ftp_cls):
12581258
with mock.patch('sys.argv', ['ftplib', '-rnonexistent.netrc', 'example.com']), \
12591259
support.captured_stderr() as stderr:

0 commit comments

Comments
 (0)