部分移植
This commit is contained in:
@@ -4,8 +4,8 @@ import toml
|
||||
import typing
|
||||
|
||||
class ConfigFile:
|
||||
def __init__(self, path: str):
|
||||
self.path = pathlib.Path(path)
|
||||
def __init__(self, path: pathlib.Path):
|
||||
self.path = path
|
||||
if not self.path.exists():
|
||||
self.path.touch()
|
||||
self.data = dict()
|
||||
|
||||
@@ -2,4 +2,7 @@
|
||||
import hashlib
|
||||
|
||||
def get_md5(text):
|
||||
return hashlib.md5(text.encode('utf-8')).hexdigest()
|
||||
|
||||
def hash(text):
|
||||
return hashlib.md5(text.encode('utf-8')).hexdigest()
|
||||
Reference in New Issue
Block a user