summaryrefslogtreecommitdiff
path: root/portato/gui
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--portato/gui/gui_helper.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/portato/gui/gui_helper.py b/portato/gui/gui_helper.py
index 62dd755..5d171d6 100644
--- a/portato/gui/gui_helper.py
+++ b/portato/gui/gui_helper.py
@@ -268,6 +268,10 @@ class EmergeQueue:
self.db = db
self.title_update = title_update
self.threadClass = threadClass
+
+ if self.console:
+ self.pty = pty.openpty()
+ self.console.set_pty(self.pty[0])
def _get_pkg_from_cpv (self, cpv, unmask = False):
"""Gets a L{backend.Package}-object from a cpv.
@@ -486,12 +490,8 @@ class EmergeQueue:
command = system.get_merge_command()
# open tty
- if self.console is not None:
- if not self.pty:
- self.pty = pty.openpty()
- self.console.set_pty(self.pty[0])
- else:
- self.console.reset()
+ if self.console:
+ self.console.reset()
def pre ():
os.setsid() # new session