whitespace fixes

This commit is contained in:
Jan Petykiewicz 2019-10-27 13:05:27 -07:00
parent 8b5d5af95b
commit 4deaa41d7e

View File

@ -40,7 +40,7 @@ def ptrace(command: int, pid: int = 0, arg1: int = 0, arg2: int = 0) -> int:
""" """
Call ptrace() with the provided pid and arguments. See the ```man ptrace```. Call ptrace() with the provided pid and arguments. See the ```man ptrace```.
""" """
logger.debug('ptrace({}, {}, {}, {})'.format(command, pid, arg1, arg2)) logger.debug('ptrace({}, {}, {}, {})'.format(command, pid, arg1, arg2))
result = _ptrace(command, pid, arg1, arg2) result = _ptrace(command, pid, arg1, arg2)
if result == -1: if result == -1:
err_no = ctypes.get_errno() err_no = ctypes.get_errno()
@ -58,7 +58,7 @@ class Process(AbstractProcess):
self.pid = process_id self.pid = process_id
def close(self): def close(self):
os.kill(self.pid, signal.SIGSTOP) os.kill(self.pid, signal.SIGSTOP)
ptrace(ptrace_commands['PTRACE_DETACH'], self.pid, 0, 0) ptrace(ptrace_commands['PTRACE_DETACH'], self.pid, 0, 0)
self.pid = None self.pid = None
@ -78,7 +78,7 @@ class Process(AbstractProcess):
with open('/proc/{}/cmdline', 'rb') as f: with open('/proc/{}/cmdline', 'rb') as f:
return f.read().decode().split('\x00')[0] return f.read().decode().split('\x00')[0]
except FileNotFoundError: except FileNotFoundError:
return '' return ''
@staticmethod @staticmethod
def list_available_pids() -> List[int]: def list_available_pids() -> List[int]: