ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/pystatgrab/_statgrab.pyx
(Generate patch)

Comparing projects/pystatgrab/_statgrab.pyx (file contents):
Revision 1.17 by tdb, Sat Jul 30 18:16:14 2005 UTC vs.
Revision 1.19 by tdb, Fri Jul 13 22:19:56 2007 UTC

# Line 295 | Line 295 | def py_sg_init():
295      else:
296          return False
297  
298 + def py_sg_shutdown():
299 +    if sg_shutdown() == 0:
300 +        return True
301 +    else:
302 +        return False
303 +
304 + def py_sg_snapshot():
305 +    if sg_snapshot() == 0:
306 +        return True
307 +    else:
308 +        return False
309 +
310   def py_sg_drop_privileges():
311      if sg_drop_privileges() == 0:
312          return True
# Line 597 | Line 609 | def py_sg_get_process_stats():
609          raise StatgrabException, 'sg_get_process_stats() returned NULL'
610      list = []
611      for i from 0 <= i < entries:
612 <        if s.process_name == NULL:
613 <            s.process_name = ''
614 <        if s.proctitle == NULL:
615 <            s.proctitle = ''
612 >        if s.process_name is NULL:
613 >            process_name = ''
614 >        else:
615 >            process_name = s.process_name
616 >        if s.proctitle is NULL:
617 >            proctitle = ''
618 >        else:
619 >            proctitle = s.proctitle
620          list.append(Result(
621 <            {'process_name': s.process_name,
622 <             'proctitle' : s.proctitle,
621 >            {'process_name': process_name,
622 >             'proctitle' : proctitle,
623               'pid' : s.pid,
624               'parent' : s.parent,
625               'pgid' : s.pgid,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines