testing_2ブランチの変更をマージ
This commit is contained in:
parent
db9afe38f2
commit
5653b79906
1 changed files with 0 additions and 47 deletions
|
@ -326,52 +326,6 @@ def master_password_gen():
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
config_dir_path = "./config/"
|
|
||||||
client_config_path = config_dir_path + "client.json"
|
|
||||||
if not os.path.isfile(client_config_path):
|
|
||||||
if not os.path.isdir(config_dir_path):
|
|
||||||
os.mkdir(config_dir_path)
|
|
||||||
|
|
||||||
client_config = {
|
|
||||||
"initial": 1,
|
|
||||||
"auth_host_url": "http://localhost",
|
|
||||||
"pc_number": 1,
|
|
||||||
"master_password_hash": "",
|
|
||||||
"testing": 0
|
|
||||||
|
|
||||||
}
|
|
||||||
with open(client_config_path, "w") as w:
|
|
||||||
json.dump(client_config, w, indent=4)
|
|
||||||
elif os.path.isfile(client_config_path):
|
|
||||||
with open(client_config_path, "r") as r:
|
|
||||||
client_config = json.load(r)
|
|
||||||
|
|
||||||
|
|
||||||
if client_config["initial"] == 1:
|
|
||||||
args = sys.argv
|
|
||||||
if len(args) >= 2:
|
|
||||||
if args[1] == "setup":
|
|
||||||
client_config["pc_number"] = int(args[2])
|
|
||||||
else:
|
|
||||||
print("引数エラー。")
|
|
||||||
master_password = master_password_gen()
|
|
||||||
msgbox = tkinter.messagebox.showinfo(title=f"{app_name} | 初回起動を検出", message=f"初回起動のようです。\nマスターパスワードを記録しておいてください。\nこれ以降二度と表示されることはないでしょう。\n\n{master_password["password"]}\n\nまた、認証先サーバーの接続先を指定してください。ロックを解除できなくなります。")
|
|
||||||
client_config["master_password_hash"] = master_password["password_hash"]
|
|
||||||
client_config["initial"] = 0
|
|
||||||
with open(client_config_path, "w") as w:
|
|
||||||
json.dump(client_config, w, indent=4)
|
|
||||||
|
|
||||||
else:
|
|
||||||
if __name__ == '__main__':
|
|
||||||
args = sys.argv
|
|
||||||
if len(args) >= 2:
|
|
||||||
if args[1] == "stop":
|
|
||||||
monitor = Monitor()
|
|
||||||
monitor.signal_handler()
|
|
||||||
else:
|
|
||||||
print("引数エラー。")
|
|
||||||
=======
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
args = sys.argv
|
args = sys.argv
|
||||||
if len(args) >= 2:
|
if len(args) >= 2:
|
||||||
|
@ -385,7 +339,6 @@ if __name__ == '__main__':
|
||||||
else:
|
else:
|
||||||
if client_config["initial"] == 1:
|
if client_config["initial"] == 1:
|
||||||
init()
|
init()
|
||||||
>>>>>>> testing_2
|
|
||||||
else:
|
else:
|
||||||
app = App()
|
app = App()
|
||||||
app.protocol("WM_DELETE_WINDOW", app.handler_close)
|
app.protocol("WM_DELETE_WINDOW", app.handler_close)
|
||||||
|
|
Loading…
Reference in a new issue