manjaro / pacman-mirrors

This repo has been archived. Our code is now hosted at
https://gitlab.manjaro.org
GNU General Public License v3.0
25 stars 16 forks source link

Network errors cause the process to break #119

Closed KCCat closed 6 years ago

KCCat commented 6 years ago

Manjaro 17.1.2 Hakoila pacman-mirrors Version 4.7.0

   ..... Greece         : http://ftp.cc.uoc.gr/mirrors/linux/manjaro/Traceback (most recent call last):
  File "/usr/bin/pacman-mirrors", line 56, in <module>
    pm.run()
  File "/usr/lib/python3.6/site-packages/pacman_mirrors/pacman_mirrors.py", line 940, in run
    self.build_interactive_mirror_list()
  File "/usr/lib/python3.6/site-packages/pacman_mirrors/pacman_mirrors.py", line 568, in build_interactive_mirror_list
    worklist = self.test_mirrors(worklist)
  File "/usr/lib/python3.6/site-packages/pacman_mirrors/pacman_mirrors.py", line 884, in test_mirrors
    quiet=self.quiet, ssl_verify=ssl_verify)
  File "/usr/lib/python3.6/site-packages/pacman_mirrors/functions/httpFn.py", line 132, in get_mirror_response
    urlopen(req, timeout=maxwait, context=context)
  File "/usr/lib/python3.6/urllib/request.py", line 223, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.6/urllib/request.py", line 526, in open
    response = self._open(req, data)
  File "/usr/lib/python3.6/urllib/request.py", line 544, in _open
    '_open', req)
  File "/usr/lib/python3.6/urllib/request.py", line 504, in _call_chain
    result = func(*args)
  File "/usr/lib/python3.6/urllib/request.py", line 1346, in http_open
    return self.do_open(http.client.HTTPConnection, req)
  File "/usr/lib/python3.6/urllib/request.py", line 1321, in do_open
    r = h.getresponse()
  File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/lib/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib/python3.6/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [Errno 104] Connection reset by peer

In China, "Great Firewall (of China)" will cause the process to be interrupted. Can this error be ignored and continue the process? (My English is not good, I use google translate to exchange.)

fhdk commented 6 years ago

7f731f65ce058561a493609077587bbfcdcbdf0a