From 3b3b95838e6d7f0e0e3efdacfc1dc50e1d0597de Mon Sep 17 00:00:00 2001 From: meejah Date: Mon, 16 Nov 2020 16:55:06 -0700 Subject: [PATCH] tempdir should be native-string --- src/allmydata/node.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/allmydata/node.py b/src/allmydata/node.py index 498b70a5d..a72303e33 100644 --- a/src/allmydata/node.py +++ b/src/allmydata/node.py @@ -28,6 +28,7 @@ import configparser from twisted.python import log as twlog from twisted.application import service from twisted.python.failure import Failure +from twisted.python.compat import nativeString from foolscap.api import Tub, app_versions import foolscap.logging.log from allmydata.version_checks import get_package_versions, get_package_versions_string @@ -828,7 +829,7 @@ class Node(service.MultiService): tempdir = self.config.get_config_path(tempdir_config) if not os.path.exists(tempdir): fileutil.make_dirs(tempdir) - tempfile.tempdir = tempdir + tempfile.tempdir = nativeString(tempdir) # this should cause twisted.web.http (which uses # tempfile.TemporaryFile) to put large request bodies in the given # directory. Without this, the default temp dir is usually /tmp/,