mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-23 17:22:46 +03:00
fix: misc - broken imports
This commit is contained in:
parent
9dd3c444e4
commit
d8c06e5b40
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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)."""
|
||||
|
Loading…
Reference in New Issue
Block a user