Changeset 5428


Ignore:
Timestamp:
Jun 30, 2017, 3:00:23 PM (18 months ago)
Author:
hectorgh
Message:

adding changes to support failed mirror check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-base-files/trunk/fuentes/install/usr/bin/lliurex-version

    r4449 r5428  
    218218    need_structure={'pool':[{'main':{'l/lliurex-version-timestamp':('regexp','lliurex-version-timestamp_.*\.deb$')}},'universe','multiverse','preschool','restricted'],
    219219                    'dists':['xenial','xenial-security','xenial-updates']}
    220 
    221     return os.path.isdir(mirror_location) and check_structure(mirror_location,need_structure)
     220    try:
     221        return os.path.isdir(mirror_location) and check_structure(mirror_location,need_structure)
     222    except Exception as e:
     223        # As a guest user, /net isn't accessible somehow. Nontheless, if something goes wrong, we return False anyway
     224        #print(e)
     225        return False
    222226
    223227def check_structure(path_from,child=''):
Note: See TracChangeset for help on using the changeset viewer.