ソースを参照

process_alive: add some assertions

Thomas Waldmann 7 年 前
コミット
2bf1b29e8e
1 ファイル変更5 行追加0 行削除
  1. 5 0
      src/borg/platform/posix.pyx

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

@@ -25,6 +25,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