Changeset 3515


Ignore:
Timestamp:
Feb 2, 2017, 2:58:37 PM (2 years ago)
Author:
Juanma
Message:

Fixed duplicated http:// on custom mirrors

Location:
lliurex-mirror/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-mirror/trunk/fuentes/debian/changelog

    r3364 r3515  
     1lliurex-mirror (28.4.3) xenial; urgency=medium
     2
     3  * Fixed duplicated http:// on custom mirrors
     4
     5 -- Juanma Navarro Mañez <juanma1980@gmail.com>  Thu, 02 Feb 2017 14:57:19 +0100
     6
    17lliurex-mirror (28.4.2) xenial; urgency=medium
    28
  • lliurex-mirror/trunk/fuentes/n4d-lliurex-mirror.install/usr/share/n4d/python-plugins/MirrorManager.py

    r3199 r3515  
    401401                configpath = os.path.join(self.configpath, distro + ".json")
    402402                config = json.load(open(configpath,'r'))
     403                #Sanitize mirror url if it's a custom one
     404                customMirror=config['ORIGS']['3']
     405                if "http" in customMirror:
     406                        customMirror=customMirror.split('//')[-1]
     407                        config['ORIGS']['3']=customMirror
    403408                config['CURRENT_UPDATE_OPTION'] = str(option)
    404409
     
    631636                        allconfigs[version.replace('.json','')] = json.load(f)
    632637                        f.close()
     638                        #Sanitize mirror url if it's a custom one
     639                        customMirror=allconfigs[version.replace('.json','')]['ORIGS']['3']
     640                        if "http" in customMirror:
     641                                customMirror=customMirror.split('//')[-1]
     642                                allconfigs[version.replace('.json','')]['ORIGS']['3']=customMirror
    633643                return {'status':True,'msg':allconfigs}
    634644        #def get_all_configs
Note: See TracChangeset for help on using the changeset viewer.