Changeset 1080:e65385c0e41f for src


Ignore:
Timestamp:
02/15/23 19:09:50 (14 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Removed the semi-automatic update URL updating

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/config.py

    r1067 r1080  
    211211class Config(object):
    212212    """Our configuration."""
    213     DEFAULT_UPDATE_URL = "https://mlx.varadiistvan.hu/update/new"
     213    DEFAULT_UPDATE_URL = "https://mlx.varadiistvan.hu/update"
    214214
    215215    _messageTypesSection = "messageTypes"
     
    256256        self._autoUpdate = True
    257257        self._updateURL = Config.DEFAULT_UPDATE_URL
    258         #if secondaryInstallation:
    259         #    self._updateURL += "/exp"
    260         self._updateURLUpdated = True
    261258
    262259        self._xplaneRemote = False
     
    718715    def load(self):
    719716        """Load the configuration from its default location."""
    720         self._updateURLUpdated = False
    721 
    722717        try:
    723718            config = configparser.RawConfigParser()
     
    802797
    803798        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)
    818801
    819802        for aircraftType in const.aircraftTypes:
     
    916899                   "yes" if self._autoUpdate else "no")
    917900        config.set("update", "url", self._updateURL)
    918         config.set("update", "urlUpdated", self._updateURLUpdated)
    919901
    920902        config.add_section(Checklist.SECTION)
     
    10541036        print("  autoUpdate:", self._autoUpdate)
    10551037        print("  updateURL:", self._updateURL)
    1056         print("  updateURLUpdated:", self._updateURLUpdated)
    10571038
    10581039        print("  messageTypeLevels:")
Note: See TracChangeset for help on using the changeset viewer.