summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Guo <joeg@catalyst.net.nz>2018-12-12 13:43:21 +1300
committerNoel Power <npower@samba.org>2018-12-14 18:00:40 +0100
commitedfb6cb8223be430360c8372457880471a198630 (patch)
tree7cc22d3569f1c27ba93ebda2cd744ce676fc304b
parenta07279b78a83d7e62eb0c58a2ac989407a40fb6b (diff)
downloadsamba-edfb6cb8223be430360c8372457880471a198630.tar.gz
PY3: change shebang to python3 in misc dirs
Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org> Autobuild-User(master): Noel Power <npower@samba.org> Autobuild-Date(master): Fri Dec 14 18:00:40 CET 2018 on sn-devel-144
-rwxr-xr-xauth/credentials/tests/bind.py2
-rwxr-xr-xbuildtools/examples/run_on_target.py2
-rwxr-xr-xexamples/logon/ntlogon/ntlogon.py2
-rwxr-xr-xpython/examples/dnsserver.py2
-rw-r--r--python/examples/netbios.py2
-rwxr-xr-xpython/examples/samr.py2
-rwxr-xr-xpython/examples/winreg.py2
-rwxr-xr-xpython/samba/tests/dcerpc/raw_protocol.py2
-rwxr-xr-xpython/samba/tests/subunitrun.py2
-rwxr-xr-xselftest/filter-subunit2
-rwxr-xr-xselftest/format-subunit2
-rw-r--r--selftest/format-subunit-json2
-rwxr-xr-xsource3/script/tests/test_wbinfo_sids2xids_int.py6
-rwxr-xr-xsource3/torture/test_ntlm_auth.py2
14 files changed, 16 insertions, 16 deletions
diff --git a/auth/credentials/tests/bind.py b/auth/credentials/tests/bind.py
index 31627af5769..2eaf0c0fd08 100755
--- a/auth/credentials/tests/bind.py
+++ b/auth/credentials/tests/bind.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks
diff --git a/buildtools/examples/run_on_target.py b/buildtools/examples/run_on_target.py
index 83227594512..79c57308ad0 100755
--- a/buildtools/examples/run_on_target.py
+++ b/buildtools/examples/run_on_target.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Sample run-on-target script
diff --git a/examples/logon/ntlogon/ntlogon.py b/examples/logon/ntlogon/ntlogon.py
index ff25c42ec0b..4e278f8d861 100755
--- a/examples/logon/ntlogon/ntlogon.py
+++ b/examples/logon/ntlogon/ntlogon.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
ntlogon.py written by Timothy (rhacer) Grant
diff --git a/python/examples/dnsserver.py b/python/examples/dnsserver.py
index 2f04e064746..ccb003f9212 100755
--- a/python/examples/dnsserver.py
+++ b/python/examples/dnsserver.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# script to test the dnsserver RPC protocol
diff --git a/python/examples/netbios.py b/python/examples/netbios.py
index 5f71f27b1f4..7a3a9da828f 100644
--- a/python/examples/netbios.py
+++ b/python/examples/netbios.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
diff --git a/python/examples/samr.py b/python/examples/samr.py
index 494d0862592..7cd70f5a110 100755
--- a/python/examples/samr.py
+++ b/python/examples/samr.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Unix SMB/CIFS implementation.
diff --git a/python/examples/winreg.py b/python/examples/winreg.py
index 604fe1db41a..8a7940b5a50 100755
--- a/python/examples/winreg.py
+++ b/python/examples/winreg.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# tool to manipulate a remote registry
# Copyright Andrew Tridgell 2005
diff --git a/python/samba/tests/dcerpc/raw_protocol.py b/python/samba/tests/dcerpc/raw_protocol.py
index dd1fe99fa18..d752481f6f5 100755
--- a/python/samba/tests/dcerpc/raw_protocol.py
+++ b/python/samba/tests/dcerpc/raw_protocol.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Unix SMB/CIFS implementation.
# Copyright (C) Stefan Metzmacher 2014,2015
#
diff --git a/python/samba/tests/subunitrun.py b/python/samba/tests/subunitrun.py
index 92f36edaa17..d3956620259 100755
--- a/python/samba/tests/subunitrun.py
+++ b/python/samba/tests/subunitrun.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Simple subunit testrunner for python
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index a37b2a5fbdd..4340439dd3b 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Filter a subunit stream
# Copyright (C) 2009-2011 Jelmer Vernooij <jelmer@samba.org>
diff --git a/selftest/format-subunit b/selftest/format-subunit
index 9538ce19e9a..b27513a502a 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# vim: expandtab
# Pretty-format subunit output
# Copyright (C) 2008-2010 Jelmer Vernooij <jelmer@samba.org>
diff --git a/selftest/format-subunit-json b/selftest/format-subunit-json
index e612962e322..6f100e78445 100644
--- a/selftest/format-subunit-json
+++ b/selftest/format-subunit-json
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright (C) 2008-2010 Jelmer Vernooij <jelmer@samba.org>
# Copyright (C) 2016 Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
# Published under the GNU GPL, v3 or later
diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py b/source3/script/tests/test_wbinfo_sids2xids_int.py
index 08a0091e028..cb8d8fe2af3 100755
--- a/source3/script/tests/test_wbinfo_sids2xids_int.py
+++ b/source3/script/tests/test_wbinfo_sids2xids_int.py
@@ -1,10 +1,10 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import print_function
import sys
import os
import subprocess
-from samba.compat import PY3
+from samba.compat import get_string
if len(sys.argv) != 3:
@@ -22,7 +22,7 @@ def run(cmd):
NOTE: subprocess api always return bytes, in both py2 and py3.
"""
output = subprocess.check_output(cmd).strip()
- return output.decode('utf-8') if PY3 else output
+ return get_string(output)
def flush_cache(sids=[], uids=[], gids=[]):
diff --git a/source3/torture/test_ntlm_auth.py b/source3/torture/test_ntlm_auth.py
index ac60632347d..2e04dd07565 100755
--- a/source3/torture/test_ntlm_auth.py
+++ b/source3/torture/test_ntlm_auth.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Unix SMB/CIFS implementation.
# A test for the ntlm_auth tool