Avoid OS specific function uname()

It is necessary when using the seedsigner-emulator project on Windows for example
This commit is contained in:
TadeuBAS
2023-03-09 09:19:36 -03:00
committed by GitHub
parent 2570dfef61
commit 3ec3fd08cb
+3 -2
View File
@@ -1,5 +1,6 @@
import json
import os
import platform
from typing import Any, List
@@ -10,7 +11,7 @@ from .singleton import Singleton
class Settings(Singleton):
HOSTNAME = os.uname()[1]
HOSTNAME = platform.uname()[1]
SEEDSIGNER_OS = "seedsigner-os"
SETTINGS_FILENAME = "/mnt/microsd/settings.json" if HOSTNAME == SEEDSIGNER_OS else "settings.json"
@@ -202,4 +203,4 @@ class Settings(Singleton):
# set persistent settings to only have disabled as an option, adding additional help text that microSD is removed
entry = SettingsDefinition.get_settings_entry(SettingsConstants.SETTING__PERSISTENT_SETTINGS)
entry.selection_options = SettingsConstants.OPTIONS__ONLY_DISABLED
entry.help_text = "MicroSD card is removed"
entry.help_text = "MicroSD card is removed"