(serverConfig: ServerVariables)
| 101 | |
| 102 | |
| 103 | def readServerProperties(serverConfig: ServerVariables): |
| 104 | serverConfig.serverProperties.clear() |
| 105 | try: |
| 106 | with open( |
| 107 | f"./Servers/{serverConfig.serverName}/server.properties", |
| 108 | "r", |
| 109 | encoding="utf-8", |
| 110 | ) as serverPropertiesFile: |
| 111 | lines = serverPropertiesFile.readlines() |
| 112 | for line in lines: |
| 113 | line = line.strip() |
| 114 | if line and not line.startswith("#"): |
| 115 | key, value = line.split("=", 1) |
| 116 | serverConfig.serverProperties[key.strip()] = value.strip() |
| 117 | except FileNotFoundError: |
| 118 | serverConfig.serverProperties.update({"msg": "File not found"}) |
| 119 | |
| 120 | |
| 121 | # class CrashMCAnalyzerThread(QThread): |
no outgoing calls
no test coverage detected