Esempio n. 1
0
 def ionice_set(self, value, _):
     if _:
         raise TypeError("set_proc_ionice() on Windows takes only "
                         "1 argument (2 given)")
     if value not in (2, 1, 0):
         raise ValueError("value must be 2 (normal), 1 (low) or 0 "
                          "(very low); got %r" % value)
     return cext.proc_io_priority_set(self.pid, value)
Esempio n. 2
0
 def ionice_set(self, value, _):
     if _:
         raise TypeError("set_proc_ionice() on Windows takes only "
                         "1 argument (2 given)")
     if value not in (2, 1, 0):
         raise ValueError("value must be 2 (normal), 1 (low) or 0 "
                          "(very low); got %r" % value)
     return cext.proc_io_priority_set(self.pid, value)