Pārlūkot izejas kodu

process_alive: add some assertions

(cherry picked from commit 2bf1b29e8e391361899d6ea9e5272e5939ea68da)
Thomas Waldmann 7 gadi atpakaļ
vecāks
revīzija
a51fca49bf
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      src/borg/platform/posix.pyx

+ 5 - 0
src/borg/platform/posix.pyx

@@ -30,6 +30,11 @@ def process_alive(host, pid, thread):
     from . import local_pid_alive
     from . import hostid
 
+    assert isinstance(host, str)
+    assert isinstance(hostid, str)
+    assert isinstance(pid, int)
+    assert isinstance(thread, int)
+
     if host != hostid:
         return True