Changeset 1080:e65385c0e41f for src
- Timestamp:
- 02/15/23 19:09:50 (21 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/config.py
r1067 r1080 211 211 class Config(object): 212 212 """Our configuration.""" 213 DEFAULT_UPDATE_URL = "https://mlx.varadiistvan.hu/update /new"213 DEFAULT_UPDATE_URL = "https://mlx.varadiistvan.hu/update" 214 214 215 215 _messageTypesSection = "messageTypes" … … 256 256 self._autoUpdate = True 257 257 self._updateURL = Config.DEFAULT_UPDATE_URL 258 #if secondaryInstallation:259 # self._updateURL += "/exp"260 self._updateURLUpdated = True261 258 262 259 self._xplaneRemote = False … … 718 715 def load(self): 719 716 """Load the configuration from its default location.""" 720 self._updateURLUpdated = False721 722 717 try: 723 718 config = configparser.RawConfigParser() … … 802 797 803 798 self._autoUpdate = self._getBoolean(config, "update", "auto", True) 804 self._updateURLUpdated = self._getBoolean(config, "update", 805 "urlUpdated", False) 806 if self._updateURLUpdated: 807 self._updateURL = self._get(config, "update", "url", 808 Config.DEFAULT_UPDATE_URL) # + 809 #("/exp" if secondaryInstallation else "")) 810 811 if self._updateURL.find("update/new")>0 or \ 812 self._updateURL.find("update/py3")>0: 813 self._updateURL = "https://mlx.varadiistvan.hu/update" 814 self._updateURLUpdated = False 815 if self._updateURL.startswith("http://") and not self._updateURLUpdated: 816 self._updateURL = "https://" + self._updateURL[7:] 817 self._updateURLUpdated = True 799 self._updateURL = self._get(config, "update", "url", 800 Config.DEFAULT_UPDATE_URL) 818 801 819 802 for aircraftType in const.aircraftTypes: … … 916 899 "yes" if self._autoUpdate else "no") 917 900 config.set("update", "url", self._updateURL) 918 config.set("update", "urlUpdated", self._updateURLUpdated)919 901 920 902 config.add_section(Checklist.SECTION) … … 1054 1036 print(" autoUpdate:", self._autoUpdate) 1055 1037 print(" updateURL:", self._updateURL) 1056 print(" updateURLUpdated:", self._updateURLUpdated)1057 1038 1058 1039 print(" messageTypeLevels:")
Note:
See TracChangeset
for help on using the changeset viewer.