only traceback for unknown errors
This commit is contained in:
parent
55a858c410
commit
051db29cb0
1 changed files with 4 additions and 1 deletions
|
@ -11,13 +11,13 @@ import urllib.request, urllib.error, urllib.parse
|
|||
from datetime import datetime
|
||||
import os
|
||||
import time
|
||||
import socket
|
||||
|
||||
import ox
|
||||
from tornado.ioloop import PeriodicCallback
|
||||
|
||||
import settings
|
||||
import user.models
|
||||
from changelog import Changelog
|
||||
|
||||
from websocket import trigger_event
|
||||
from localnodes import LocalNodes
|
||||
|
@ -297,6 +297,9 @@ class Node(Thread):
|
|||
self._opener.addheaders = list(zip(self.headers.keys(), self.headers.values()))
|
||||
try:
|
||||
r = self._opener.open(url, timeout=self.TIMEOUT*5)
|
||||
except socket.timeout:
|
||||
logger.debug('timeout %s', url)
|
||||
return False
|
||||
except:
|
||||
logger.debug('openurl failed %s', url, exc_info=True)
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue