fix: misc - broken imports

This commit is contained in:
Bharath Vignesh J K 2023-05-10 02:00:33 +05:30
parent 9dd3c444e4
commit d8c06e5b40
3 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@
import sys
from glances.logger import logger
from glances.exports.glances_export import GlancesExport
from glances.exports.export import GlancesExport
import pymongo
from urllib.parse import quote_plus

View File

@ -24,13 +24,14 @@ import types
import subprocess
from datetime import datetime
import re
import base64
import queue
from configparser import ConfigParser, NoOptionError, NoSectionError
from statistics import mean
from xmlrpc.client import Fault, ProtocolError, ServerProxy, Transport, Server
from xmlrpc.server import SimpleXMLRPCRequestHandler, SimpleXMLRPCServer
from urllib.request import urlopen, Request, base64
from urllib.request import urlopen, Request
from urllib.error import HTTPError, URLError
from urllib.parse import urlparse

View File

@ -44,7 +44,7 @@ class GlancesPassword(object):
def get_hash(self, plain_password, salt=''):
"""Return the hashed password, salt + pbkdf2_hmac."""
return to_hex(hashlib.pbkdf2_hmac('sha256', plain_password.encode(), salt.encode(), 100000, dklen=128))
return hashlib.pbkdf2_hmac('sha256', plain_password.encode(), salt.encode(), 100000, dklen=128).hex()
def hash_password(self, plain_password):
"""Hash password with a salt based on UUID (universally unique identifier)."""