| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3/dist-packages/pysmi/ |
Upload File : |
#
# This file is part of pysmi software.
#
# Copyright (c) 2015-2018, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysmi/license.html
#
import sys
if sys.version_info[0] > 2:
def encode(s):
if isinstance(s, str):
s = s.encode('utf-8', 'ignore')
return s
def decode(s):
if isinstance(s, bytes):
s = s.decode('utf-8', 'ignore')
return s
else:
def encode(s):
if isinstance(s, unicode):
s = s.encode('utf-8', 'ignore')
return s
def decode(s):
if isinstance(s, str):
s = s.decode('utf-8', 'ignore')
return s