diff options
| -rw-r--r-- | meta/lib/oe/lsb.py | 17 | 
1 files changed, 9 insertions, 8 deletions
| diff --git a/meta/lib/oe/lsb.py b/meta/lib/oe/lsb.py index 50c1d4720b..ddfe71b6b5 100644 --- a/meta/lib/oe/lsb.py +++ b/meta/lib/oe/lsb.py @@ -37,14 +37,6 @@ def release_dict_file():              if match:                  data['DISTRIB_ID'] = match.group(1)                  data['DISTRIB_RELEASE'] = match.group(2) -        elif os.path.exists('/etc/SuSE-release'): -            data = {} -            data['DISTRIB_ID'] = 'SUSE LINUX' -            with open('/etc/SuSE-release') as f: -                for line in f: -                    if line.startswith('VERSION = '): -                        data['DISTRIB_RELEASE'] = line[10:].rstrip() -                        break          elif os.path.exists('/etc/os-release'):              data = {}              with open('/etc/os-release') as f: @@ -53,6 +45,15 @@ def release_dict_file():                          data['DISTRIB_ID'] = line[5:].rstrip().strip('"')                      if line.startswith('VERSION_ID='):                          data['DISTRIB_RELEASE'] = line[11:].rstrip().strip('"') +        elif os.path.exists('/etc/SuSE-release'): +            data = {} +            data['DISTRIB_ID'] = 'SUSE LINUX' +            with open('/etc/SuSE-release') as f: +                for line in f: +                    if line.startswith('VERSION = '): +                        data['DISTRIB_RELEASE'] = line[10:].rstrip() +                        break +      except IOError:          return None      return data | 
