netcmd: Fix broken samba-tool gpo commands
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 10 Jan 2019 03:34:27 +0000 (16:34 +1300)
committerNoel Power <npower@samba.org>
Thu, 10 Jan 2019 15:21:23 +0000 (16:21 +0100)
commit36ff1a5126605e14c3a77337b654c95c668c573a
tree8fdd660ae4a8ec1ac7d3a35772755aeb53648f0c
parentd7d3ee18a5979168b6cab42d692eb39fa5d44154
netcmd: Fix broken samba-tool gpo commands

samba-tool gpo create|fetch|backup commands throw exceptions due to a
missing Python import:

ERROR(<class 'NameError'>): uncaught exception - name 'tempfile' is not
defined
  File "bin/python/samba/netcmd/__init__.py", line 184, in _run
    return self.run(*args, **kwargs)
  File "bin/python/samba/netcmd/gpo.py", line 980, in run
    tmpdir, gpodir = self.construct_tmpdir(tmpdir, gpo)
  File "bin/python/samba/netcmd/gpo.py", line 386, in construct_tmpdir
    tmpdir = tempfile.mkdtemp()

Introduced by commit e3320b6d3df7a0c7b refactor.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Thu Jan 10 16:21:23 CET 2019 on sn-devel-144
python/samba/netcmd/gpo.py