Ignore:
Timestamp:
Apr 19, 2018, 12:09:16 PM (20 months ago)
Author:
mabarracus
Message:

Add compatibility code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lliurex-analytics-server/trunk/fuentes/lliurex-analytics-server/usr/sbin/analyticsd

    r7150 r7153  
    832832    def get_mem_usage(self):
    833833        process = psutil.Process(os.getpid())
    834         mem = process.memory_info()[0] / float(2 ** 20)
     834        try:
     835            mem = process.memory_info()[0] / float(2 ** 20)
     836        except:
     837            mem = process.get_memory_info()[0] / float(2 ** 20)
    835838        return mem
    836839
     
    10471050        a=False
    10481051        b=False
    1049         for argument in proc.cmdline():
     1052        try:
     1053            cmd=proc.cmdline()
     1054        except:
     1055            cmd=proc.cmdline
     1056        for argument in cmd:
    10501057            #print('{} {} {}'.format(proc.cmdline,keyword,argument[-len(keyword):]))
    10511058            if interpreter in argument[-len(interpreter):]:
Note: See TracChangeset for help on using the changeset viewer.