diff --git a/shadowsocks/crypto/util.py b/shadowsocks/crypto/util.py index e579455..a16baba 100644 --- a/shadowsocks/crypto/util.py +++ b/shadowsocks/crypto/util.py @@ -87,8 +87,8 @@ def find_library(possible_lib_names, search_symbol, library_name): else: logging.warn('can\'t find symbol %s in %s', search_symbol, path) - except Exception: - pass + except ValueError as e: + print(e) return None diff --git a/shadowsocks/tcprelay.py b/shadowsocks/tcprelay.py index cecd017..87710c1 100644 --- a/shadowsocks/tcprelay.py +++ b/shadowsocks/tcprelay.py @@ -707,8 +707,8 @@ class TCPRelay(object): self._closed = False self._eventloop = None self._fd_to_handlers = {} - self.server_transfer_ul = 0L - self.server_transfer_dl = 0L + self.server_transfer_ul = 0 + self.server_transfer_dl = 0 self._timeout = config['timeout'] self._timeouts = [] # a list for all the handlers diff --git a/shadowsocks/udprelay.py b/shadowsocks/udprelay.py index 3ea9b6d..315a0b0 100644 --- a/shadowsocks/udprelay.py +++ b/shadowsocks/udprelay.py @@ -873,8 +873,8 @@ class UDPRelay(object): self._dns_cache = lru_cache.LRUCache(timeout=300) self._eventloop = None self._closed = False - self.server_transfer_ul = 0L - self.server_transfer_dl = 0L + self.server_transfer_ul = 0 + self.server_transfer_dl = 0 self._sockets = set() self._fd_to_handlers = {}