Changeset 3604 for n4d-lliurexberry


Ignore:
Timestamp:
Feb 13, 2017, 2:29:00 PM (2 years ago)
Author:
mabarracus
Message:

Added compatibility with older dpkg versions

Location:
n4d-lliurexberry/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • n4d-lliurexberry/trunk/fuentes/debian/changelog

    r3600 r3604  
     1n4d-lliurexberry (0.22-2) xenial; urgency=medium
     2
     3  * Added compatibility with older dpkg versions
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Mon, 13 Feb 2017 14:15:40 +0100
     6
    17n4d-lliurexberry (0.22-1) xenial; urgency=medium
    28
  • n4d-lliurexberry/trunk/fuentes/install/usr/share/n4d/python-plugins/lliurexberry.py

    r3566 r3604  
    6767                try:
    6868                    with open(os.devnull,'w') as devnull:
    69                         output=s.check_output(['dpkg-query','-W','-f=${db:Status-status}',self.pkg],stderr=devnull)
    70                         if output.upper() == 'INSTALLED':
     69                        output=s.check_output(['dpkg-query','-W','-f=${Status}',self.pkg],stderr=devnull)
     70                        regexp='\s*install\s+ok\s+installed'
     71                        reg1=re.compile(regexp)
     72                        if reg1.match(output):
    7173                            return {"status": True, "msg": "True"}
    7274                        else:
    73                             return {"status": False, "msg": "False"}
    74                 except:
     75                            return {"status": False, "msg": "False, the status is: "+output}
     76                except Exception as e:
    7577                        return {"status": False, "msg": "False"}
    7678        #def check_for_data_package(self)
Note: See TracChangeset for help on using the changeset viewer.