Use named argument 'dir' instead of 'prefix' on NamedTemporaryFile for domain.py
authorHoracio G. de Oro <hgdeoro@gmail.com>
Fri, 3 Feb 2012 01:52:28 +0000 (22:52 -0300)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 7 Feb 2012 00:11:07 +0000 (01:11 +0100)
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
source4/scripting/python/samba/netcmd/domain.py

index 1e26850277f5232dc81bb7c9fbf85f5ef6ad86b8..176c4612dbad055971f085c69e1974999c423da5 100644 (file)
@@ -848,9 +848,9 @@ class cmd_domain_samba3upgrade(Command):
             eadb = False
         elif use_xattrs == "auto" and not s3conf.get("posix:eadb"):
             if targetdir:
-                tmpfile = tempfile.NamedTemporaryFile(prefix=os.path.abspath(targetdir))
+                tmpfile = tempfile.NamedTemporaryFile(dir=os.path.abspath(targetdir))
             else:
-                tmpfile = tempfile.NamedTemporaryFile(prefix=os.path.abspath(os.path.dirname(lp.get("private dir"))))
+                tmpfile = tempfile.NamedTemporaryFile(dir=os.path.abspath(os.path.dirname(lp.get("private dir"))))
             try:
                 samba.ntacls.setntacl(lp, tmpfile.name,
                             "O:S-1-5-32G:S-1-5-32", "S-1-5-32", "native")