summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/__init__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 5679715e7..2d7c05eb8 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1605,7 +1605,12 @@ class EbuildFetchonly(SlotObject):
settings = self.settings
global_tmpdir = settings["PORTAGE_TMPDIR"]
from tempfile import mkdtemp
- private_tmpdir = mkdtemp("", "._portage_fetch_.", global_tmpdir)
+ try:
+ private_tmpdir = mkdtemp("", "._portage_fetch_.", global_tmpdir)
+ except OSError, e:
+ if e.errno != portage.exception.PermissionDenied.errno:
+ raise
+ raise portage.exception.PermissionDenied(global_tmpdir)
settings["PORTAGE_TMPDIR"] = private_tmpdir
settings.backup_changes("PORTAGE_TMPDIR")
try: