Changeset 3695


Ignore:
Timestamp:
Feb 24, 2017, 9:56:06 AM (2 years ago)
Author:
mabarracus
Message:

Return default values instead exceptions when flavour or numversion isn't available

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

Legend:

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

    r3548 r3695  
     1lliurex-detect (1.2) xenial; urgency=medium
     2
     3  * Return default values instead exceptions when flavour or numversion isn't available
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Fri, 24 Feb 2017 09:54:10 +0100
     6
    17lliurex-detect (1.1) xenial; urgency=medium
    28
  • lliurex-detect/trunk/fuentes/lliurex-detect.install/usr/bin/lliurex-detect

    r3546 r3695  
    8585                        cdd_content.extend(cdd)
    8686                except Exception as e:
    87                     raise Exception('cddflavour file error '+str(e))
     87                    cdd_content.append('None')
     88                    #raise Exception('cddflavour file error '+str(e))
    8889        else:
    8990            for root,dirnames,filenames in os.walk('/usr/share/lliurex-cdd'):
     
    9798                            cdd_content.extend(cdd)
    9899                    except Exception as e:
    99                         raise Exception('cddversion file error '+str(e))
     100                        cdd_content.append('None')
     101                        #raise Exception('cddversion file error '+str(e))
    100102            else:
    101                 raise Exception('cddflavour or cddversion file not found! ')
     103                #raise Exception('cddflavour or cddversion file not found! ')
     104                cdd_content.append('None')
    102105        cdd_content=list(set(cdd_content))
    103106        cdd_content.sort()
     
    112115    except Exception as e1:
    113116        try:
    114             with open('/usr/share/lliurex-cdd/version','r') as cdd_num_file:
     117            with open('/uusr/share/lliurex-cdd/version','r') as cdd_num_file:
    115118                return cdd_num_file.readline().strip()
    116119        except Exception as e2:
    117             raise Exception('Error1: '+e1+' and Error2: '+e2)
     120            return '0'
     121            #raise Exception('Error1: '+e1+' and Error2: '+e2)
    118122#def detect_num_cdd():
    119123
Note: See TracChangeset for help on using the changeset viewer.