Exemple #1
0
 def test_cmdline(self):
     for pid in psutil.pids():
         try:
             a = cext.proc_cmdline(pid, use_peb=True)
             b = cext.proc_cmdline(pid, use_peb=False)
         except OSError as err:
             err = convert_oserror(err)
             if not isinstance(err,
                               (psutil.AccessDenied, psutil.NoSuchProcess)):
                 raise
         else:
             self.assertEqual(a, b)
Exemple #2
0
 def test_cmdline(self):
     from psutil._pswindows import convert_oserror
     for pid in psutil.pids():
         try:
             a = cext.proc_cmdline(pid, use_peb=True)
             b = cext.proc_cmdline(pid, use_peb=False)
         except OSError as err:
             err = convert_oserror(err)
             if not isinstance(err, (psutil.AccessDenied,
                                     psutil.NoSuchProcess)):
                 raise
         else:
             self.assertEqual(a, b)