summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Schwarz <michi.schwarz@gmail.com>2015-09-11 21:26:37 +0200
committerMichael Schwarz <michi.schwarz@gmail.com>2015-09-15 18:59:35 +0200
commit63632560b6f80f91818c6bd6449cd7f8d6c4135b (patch)
tree24d443ecc3b4da4a261e96f0b6412e93766bd57c
parent853c56a38b16fa8299f483d3076713aaccc6fcf8 (diff)
downloadpogojig-63632560b6f80f91818c6bd6449cd7f8d6c4135b.tar.gz
pogojig-63632560b6f80f91818c6bd6449cd7f8d6c4135b.tar.bz2
pogojig-63632560b6f80f91818c6bd6449cd7f8d6c4135b.zip
Revert "support: Workaround for tempdir on different mount."
This reverts commit 3d21efd4897053e760ad7f4ce14a5482f66e858c.
-rw-r--r--support/lib/util.py14
1 files changed, 1 insertions, 13 deletions
diff --git a/support/lib/util.py b/support/lib/util.py
index 54b92f0..f6d8f8a 100644
--- a/support/lib/util.py
+++ b/support/lib/util.py
@@ -5,21 +5,9 @@ class UserError(Exception):
pass
-def _temp_dir_is_on_same_mount_point():
- tempdir_stat = os.stat(tempfile.gettempdir())
- working_dir_stat = os.stat('.')
-
- return tempdir_stat.st_dev == working_dir_stat.st_dev
-
-
@contextlib.contextmanager
def TemporaryDirectory():
- if _temp_dir_is_on_same_mount_point():
- dir = None
- else:
- dir = '.'
-
- dir = tempfile.mkdtemp(dir = dir, prefix = '.tmp_')
+ dir = tempfile.mkdtemp()
try:
yield dir