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
|
from datetime import datetime
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
import socket
|
||||||
|
|
||||||
import ox
|
import ox
|
||||||
from tornado.ioloop import PeriodicCallback
|
from tornado.ioloop import PeriodicCallback
|
||||||
|
|
||||||
import settings
|
import settings
|
||||||
import user.models
|
import user.models
|
||||||
from changelog import Changelog
|
|
||||||
|
|
||||||
from websocket import trigger_event
|
from websocket import trigger_event
|
||||||
from localnodes import LocalNodes
|
from localnodes import LocalNodes
|
||||||
|
@ -297,6 +297,9 @@ class Node(Thread):
|
||||||
self._opener.addheaders = list(zip(self.headers.keys(), self.headers.values()))
|
self._opener.addheaders = list(zip(self.headers.keys(), self.headers.values()))
|
||||||
try:
|
try:
|
||||||
r = self._opener.open(url, timeout=self.TIMEOUT*5)
|
r = self._opener.open(url, timeout=self.TIMEOUT*5)
|
||||||
|
except socket.timeout:
|
||||||
|
logger.debug('timeout %s', url)
|
||||||
|
return False
|
||||||
except:
|
except:
|
||||||
logger.debug('openurl failed %s', url, exc_info=True)
|
logger.debug('openurl failed %s', url, exc_info=True)
|
||||||
return False
|
return False
|
||||||
|
|
Loading…
Reference in a new issue