eric6/WebBrowser/SafeBrowsing/SafeBrowsingUtilities.py

Wed, 22 May 2019 18:55:23 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 22 May 2019 18:55:23 +0200
changeset 7022
a5f9f601b6ac
parent 6942
2602857055c5
permissions
-rw-r--r--

SafeBrowsingCache: adapted some __IGNORE_WARNING__ comments to the changed message numbers (M513 -> M523)

# -*- coding: utf-8 -*-

# Copyright (c) 2017 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing some utilities for Google Safe Browsing.
"""

from __future__ import unicode_literals

import sys

if sys.version_info < (3, 0):
    def toHex(value):
        """
        Public method to convert a bytes array to a hex string.
        
        @param value value to be converted
        @type bytes
        @return hex string
        @rtype str
        """
        return value.encode("hex")
else:
    def toHex(value):
        """
        Public method to convert a bytes array to a hex string.
        
        @param value value to be converted
        @type bytes
        @return hex string
        @rtype str
        """
        return value.hex()

eric ide

mercurial