PY3: change shebang to python3 in misc dirs
authorJoe Guo <joeg@catalyst.net.nz>
Wed, 12 Dec 2018 00:43:21 +0000 (13:43 +1300)
committerNoel Power <npower@samba.org>
Fri, 14 Dec 2018 17:00:40 +0000 (18:00 +0100)
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

14 files changed:
auth/credentials/tests/bind.py
buildtools/examples/run_on_target.py
examples/logon/ntlogon/ntlogon.py
python/examples/dnsserver.py
python/examples/netbios.py
python/examples/samr.py
python/examples/winreg.py
python/samba/tests/dcerpc/raw_protocol.py
python/samba/tests/subunitrun.py
selftest/filter-subunit
selftest/format-subunit
selftest/format-subunit-json
source3/script/tests/test_wbinfo_sids2xids_int.py
source3/torture/test_ntlm_auth.py

index 31627af5769bdce0a7c797b8d58ef8fbe9dc5d2c..2eaf0c0fd0841fe9d570b395ad42649d890742a7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 # This is unit with tests for LDAP access checks
 
index 83227594512853788e0bef0402b3bac3617b3d90..79c57308ad0df48b13bde45454f0677dcc78ef81 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 #
 # Sample run-on-target script
index ff25c42ec0bebd6e9692147fef179346452b55c6..4e278f8d8618339d1b0f3f4f6d806623d2557907 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """
 ntlogon.py written by Timothy (rhacer) Grant
 
index 2f04e064746e7169b75f542e4da1152e99835b5b..ccb003f921289ddd5470de22dd47ac83cf3ef87d 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # script to test the dnsserver RPC protocol
 
index 5f71f27b1f410219bc8663eb8c3026d79c1577c3..7a3a9da828f889adec790824b0a9b0e7d760257b 100644 (file)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Unix SMB/CIFS implementation.
 # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2008
index 494d086259242174b8026af518e051c1ce0693eb..7cd70f5a11077b46271e428d62a0a79dccd341e1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 
 # Unix SMB/CIFS implementation.
index 604fe1db41ac445aa9b8ffece4ac5d102b7c98e3..8a7940b5a50c9ce1fcde9918b49dd5549d705d45 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 #  tool to manipulate a remote registry
 #  Copyright Andrew Tridgell 2005
index dd1fe99fa188d8bcad873b6b93d2d13e84ff7d9c..d752481f6f53a41e1cb8caf11054e73ae98df52f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 # Unix SMB/CIFS implementation.
 # Copyright (C) Stefan Metzmacher 2014,2015
 #
index 92f36edaa17e89a22c71281a812bec522455d092..d39566202598e8fc4e20f053d11792161d33563c 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Simple subunit testrunner for python
 
index a37b2a5fbdd07ccc0183cd2e3df5d5253e440bdd..4340439dd3bfe9d4ddb180fbd940a3ab0beac931 100755 (executable)
@@ -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>
 
index 9538ce19e9a1339a38608cfccdaaa9fd3289118c..b27513a502a8f25d61930f5f47742d7f68834259 100755 (executable)
@@ -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>
index e612962e322c58cda44fee22e99da99532cf93c7..6f100e784451058f729c7ba8d5dd185eb710ea72 100644 (file)
@@ -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
index 08a0091e028ed5259f4ce616e98f382b75934dc0..cb8d8fe2af329b92749bd892c09713396a25a5bc 100755 (executable)
@@ -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=[]):
index ac60632347da986defd02d3bdb678efd93205c70..2e04dd075650fdb1eee64822151816b7491efc19 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Unix SMB/CIFS implementation.
 # A test for the ntlm_auth tool