mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 23:18:25 +00:00
Avoid OS specific function uname()
It is necessary when using the seedsigner-emulator project on Windows for example
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user