Terminal.close: Avoid error when self.pid is None

This commit is contained in:
Jean-Sebastien Trottier 2020-10-01 04:13:47 -04:00
parent 352fdfe279
commit 912e486b7d
1 changed files with 9 additions and 8 deletions

View File

@ -275,6 +275,7 @@ class Terminal(Gtk.VBox):
dbg('close: called')
self.cnxids.remove_widget(self.vte)
self.emit('close-term')
if self.pid is not None:
try:
dbg('close: killing %d' % self.pid)
os.kill(self.pid, signal.SIGHUP)