Upate 3.5.1
This commit is contained in:
@@ -1,12 +1,16 @@
|
||||
import os
|
||||
import configparser
|
||||
import codecs
|
||||
|
||||
|
||||
class Config:
|
||||
def __init__(self, path: str = "config.ini"):
|
||||
if os.path.exists(path):
|
||||
self.conf = configparser.ConfigParser()
|
||||
self.conf.read(path, encoding="utf-8")
|
||||
try:
|
||||
self.conf.read(path, encoding="utf-8-sig")
|
||||
except:
|
||||
self.conf.read(path, encoding="utf-8")
|
||||
else:
|
||||
print("[-] Config file not found! Use the default settings")
|
||||
self.conf = self._default_config()
|
||||
|
||||
Reference in New Issue
Block a user