From 5a67de3e30e4e9d9a989918652df330a65c0bba5 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Fri, 12 Aug 2011 23:36:41 +0200 Subject: [PATCH] [entropy.fetchers] handle "out of pty devices" error, fix Sabayon bug 2620 --- libraries/entropy/fetchers.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libraries/entropy/fetchers.py b/libraries/entropy/fetchers.py index b401aa243..dfcb48737 100644 --- a/libraries/entropy/fetchers.py +++ b/libraries/entropy/fetchers.py @@ -229,7 +229,13 @@ class UrlFetcher(TextInterface): except IOError: return - pid, fd = pty.fork() + try: + pid, fd = pty.fork() + except OSError as err: + const_debug_write(__name__, + "__fork_cmd(%s): status: %s" % (args, err,)) + # out of pty devices + return 1 if pid == 0: proc = subprocess.Popen(args, env = environ)