Ignore:
Timestamp:
Dec 1, 2017, 11:38:50 AM (2 years ago)
Author:
mabarracus
Message:

Fix type checks with unicode vars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • hwdetector/trunk/fuentes/hwdetector.install/hwdetector/modules/llxprocess.py

    r6399 r6420  
    3535        l=[]
    3636        for x in args[1:]:
    37             if type(x) == type(list()):
     37            if isinstance(x,list):
    3838                l.extend(x)
    3939            else:
     
    5252
    5353        psout=self.execute(run='ps --no-headers -Awwo pid,euid,egid,args')
    54         regexp=re.compile(r'(?P<PID>\d+)\s+(?P<EUID>\d+)\s+(?P<EGID>\d+)\s+(?P<FULL_CMD>.*)$')
     54        regexp=re.compile(r'(?P<PID>\d+)\s+(?P<EUID>\d+)\s+(?P<EGID>\d+)\s+(?P<FULL_CMD>.*)$',re.UNICODE)
    5555        for line in psout.split("\n"):
    5656            m=re.search(regexp,line)
Note: See TracChangeset for help on using the changeset viewer.