Skip to content

Commit

Permalink
PY3: change shebang to python3 in misc dirs
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Guo <[email protected]>
Reviewed-by: Noel Power <[email protected]>

Autobuild-User(master): Noel Power <[email protected]>
Autobuild-Date(master): Fri Dec 14 18:00:40 CET 2018 on sn-devel-144
  • Loading branch information
catalyst-joe-guo authored and Noel Power committed Dec 14, 2018
1 parent a07279b commit edfb6cb
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion auth/credentials/tests/bind.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks

Expand Down
2 changes: 1 addition & 1 deletion buildtools/examples/run_on_target.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

#
# Sample run-on-target script
Expand Down
2 changes: 1 addition & 1 deletion examples/logon/ntlogon/ntlogon.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
"""
ntlogon.py written by Timothy (rhacer) Grant
Expand Down
2 changes: 1 addition & 1 deletion python/examples/dnsserver.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# script to test the dnsserver RPC protocol

Expand Down
2 changes: 1 addition & 1 deletion python/examples/netbios.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <[email protected]> 2008
Expand Down
2 changes: 1 addition & 1 deletion python/examples/samr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Unix SMB/CIFS implementation.
Expand Down
2 changes: 1 addition & 1 deletion python/examples/winreg.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
#
# tool to manipulate a remote registry
# Copyright Andrew Tridgell 2005
Expand Down
2 changes: 1 addition & 1 deletion python/samba/tests/dcerpc/raw_protocol.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Unix SMB/CIFS implementation.
# Copyright (C) Stefan Metzmacher 2014,2015
#
Expand Down
2 changes: 1 addition & 1 deletion python/samba/tests/subunitrun.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# Simple subunit testrunner for python

Expand Down
2 changes: 1 addition & 1 deletion selftest/filter-subunit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Filter a subunit stream
# Copyright (C) 2009-2011 Jelmer Vernooij <[email protected]>

Expand Down
2 changes: 1 addition & 1 deletion selftest/format-subunit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# vim: expandtab
# Pretty-format subunit output
# Copyright (C) 2008-2010 Jelmer Vernooij <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion selftest/format-subunit-json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# Copyright (C) 2008-2010 Jelmer Vernooij <[email protected]>
# Copyright (C) 2016 Douglas Bagnall <[email protected]>
# Published under the GNU GPL, v3 or later
Expand Down
6 changes: 3 additions & 3 deletions source3/script/tests/test_wbinfo_sids2xids_int.py
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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=[]):
Expand Down
2 changes: 1 addition & 1 deletion source3/torture/test_ntlm_auth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

# Unix SMB/CIFS implementation.
# A test for the ntlm_auth tool
Expand Down

0 comments on commit edfb6cb

Please sign in to comment.