# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-
+from __future__ import print_function
import os
import samba.getopt as options
import ldb
# Copy GPT
if tmpdir is None:
- tmpdir = "/tmp"
+ tmpdir = tempfile.mkdtemp()
+ print("Using temporary directory %s (use --tmpdir to change)" % tmpdir,
+ file=self.outf)
if not os.path.isdir(tmpdir):
raise CommandError("Temoprary directory '%s' does not exist" % tmpdir)
# Copy GPT
if tmpdir is None:
- tmpdir = "/tmp"
+ tmpdir = tempfile.mkdtemp()
+ print("Using temporary directory %s (use --tmpdir to change)" % tmpdir,
+ file=self.outf)
if not os.path.isdir(tmpdir):
raise CommandError("Temoprary directory '%s' does not exist" % tmpdir)
# Create GPT
if tmpdir is None:
- tmpdir = "/tmp"
+ tmpdir = tempfile.mkdtemp()
+ print("Using temporary directory %s (use --tmpdir to change)" % tmpdir,
+ file=self.outf)
if not os.path.isdir(tmpdir):
raise CommandError("Temporary directory '%s' does not exist" % tmpdir)
self.tmpdir = tmpdir