summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/gpo.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/samba/netcmd/gpo.py b/python/samba/netcmd/gpo.py
index 3b21dc6128c..fe8afa7d9a0 100644
--- a/python/samba/netcmd/gpo.py
+++ b/python/samba/netcmd/gpo.py
@@ -1296,6 +1296,10 @@ class cmd_create(GPOCommand):
else:
self.samdb.transaction_commit()
+ if tmpdir is None:
+ # Without --tmpdir, we created one in /tmp/. It must go.
+ shutil.rmtree(self.tmpdir)
+
self.outf.write("GPO '%s' created as %s\n" % (displayname, gpo))