diff options
26 files changed, 78 insertions, 29 deletions
diff --git a/examples/scripts/vfs/media_harmony/trigger_avid_update.py b/examples/scripts/vfs/media_harmony/trigger_avid_update.py index ca7e7d89095..7d724ef6c88 100755 --- a/examples/scripts/vfs/media_harmony/trigger_avid_update.py +++ b/examples/scripts/vfs/media_harmony/trigger_avid_update.py @@ -1,5 +1,8 @@ #!/usr/bin/python -import os, socket, sys, stat +import os +import socket +import sys +import stat ###################################################################### ## diff --git a/python/samba/drs_utils.py b/python/samba/drs_utils.py index 8b812e43b86..4db8fa00a58 100644 --- a/python/samba/drs_utils.py +++ b/python/samba/drs_utils.py @@ -23,7 +23,8 @@ from samba.ndr import ndr_unpack from samba import dsdb from samba import werror from samba import WERRORError -import samba, ldb +import samba +import ldb from samba.dcerpc.drsuapi import DRSUAPI_ATTID_name import re diff --git a/python/samba/join.py b/python/samba/join.py index dd8aca9e567..803379746e1 100644 --- a/python/samba/join.py +++ b/python/samba/join.py @@ -22,7 +22,10 @@ from __future__ import print_function from samba.auth import system_session from samba.samdb import SamDB from samba import gensec, Ldb, drs_utils, arcfour_encrypt, string_to_byte_array -import ldb, samba, sys, uuid +import ldb +import samba +import sys +import uuid from samba.ndr import ndr_pack, ndr_unpack from samba.dcerpc import security, drsuapi, misc, nbt, lsa, drsblobs, dnsserver, dnsp from samba.dsdb import DS_DOMAIN_FUNCTION_2003 diff --git a/python/samba/netcmd/__init__.py b/python/samba/netcmd/__init__.py index 6e133591155..3c785a1d5dc 100644 --- a/python/samba/netcmd/__init__.py +++ b/python/samba/netcmd/__init__.py @@ -16,11 +16,13 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import optparse, samba +import optparse +import samba from samba import getopt as options from samba import colour from ldb import LdbError -import sys, traceback +import sys +import traceback import textwrap diff --git a/python/samba/netcmd/dbcheck.py b/python/samba/netcmd/dbcheck.py index fe29d18dbf9..3a940bf6d6a 100644 --- a/python/samba/netcmd/dbcheck.py +++ b/python/samba/netcmd/dbcheck.py @@ -16,7 +16,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import ldb, sys +import ldb +import sys import samba.getopt as options from samba.auth import system_session from samba.samdb import SamDB diff --git a/python/samba/ntacls.py b/python/samba/ntacls.py index 9b592629296..620ec77d48b 100644 --- a/python/samba/ntacls.py +++ b/python/samba/ntacls.py @@ -25,7 +25,9 @@ import tarfile import tempfile import shutil -import samba.xattr_native, samba.xattr_tdb, samba.posix_eadb +import samba.xattr_native +import samba.xattr_tdb +import samba.posix_eadb from samba.samba3 import param as s3param from samba.dcerpc import security, xattr, idmap from samba.ndr import ndr_pack, ndr_unpack diff --git a/python/samba/tests/blackbox/samba_dnsupdate.py b/python/samba/tests/blackbox/samba_dnsupdate.py index 26496740bb4..56416330e72 100644 --- a/python/samba/tests/blackbox/samba_dnsupdate.py +++ b/python/samba/tests/blackbox/samba_dnsupdate.py @@ -23,7 +23,8 @@ from samba.credentials import Credentials from samba.auth import system_session from samba.samdb import SamDB import ldb -import shutil, os +import shutil +import os class SambaDnsUpdateTests(samba.tests.BlackboxTestCase): diff --git a/python/samba/tests/common.py b/python/samba/tests/common.py index 146c6a8de9d..11510b63be7 100644 --- a/python/samba/tests/common.py +++ b/python/samba/tests/common.py @@ -17,7 +17,8 @@ """Tests for samba.common""" -import samba, os +import samba +import os import samba.tests from samba.common import * from samba.samdb import SamDB diff --git a/python/samba/tests/dckeytab.py b/python/samba/tests/dckeytab.py index 239d3113dad..3149828c4dd 100644 --- a/python/samba/tests/dckeytab.py +++ b/python/samba/tests/dckeytab.py @@ -16,7 +16,9 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import os, sys, string +import os +import sys +import string from samba.net import Net import samba.dckeytab from samba import tests diff --git a/python/samba/tests/netbios.py b/python/samba/tests/netbios.py index 82a0ef528ba..61457c6aa7f 100644 --- a/python/samba/tests/netbios.py +++ b/python/samba/tests/netbios.py @@ -15,7 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import samba, os, random, sys +import samba +import os +import random +import sys from samba import netbios diff --git a/python/samba/tests/samba_tool/fsmo.py b/python/samba/tests/samba_tool/fsmo.py index ef475e89c69..eb2116acb57 100644 --- a/python/samba/tests/samba_tool/fsmo.py +++ b/python/samba/tests/samba_tool/fsmo.py @@ -15,7 +15,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import os, ldb +import os +import ldb from samba.tests.samba_tool.base import SambaToolCmdTest diff --git a/python/samba/tests/samba_tool/join.py b/python/samba/tests/samba_tool/join.py index 8491f092658..3c3449b8e9e 100644 --- a/python/samba/tests/samba_tool/join.py +++ b/python/samba/tests/samba_tool/join.py @@ -15,7 +15,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -import os, ldb +import os +import ldb from samba.tests.samba_tool.base import SambaToolCmdTest diff --git a/python/samba/tests/smb.py b/python/samba/tests/smb.py index 559bb2558a4..8f6b13193f5 100644 --- a/python/samba/tests/smb.py +++ b/python/samba/tests/smb.py @@ -15,7 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -import samba, os, random, sys +import samba +import os +import random +import sys from samba import smb PY3 = sys.version_info[0] == 3 diff --git a/python/samba/tests/xattr.py b/python/samba/tests/xattr.py index c137dd58484..5943464c047 100644 --- a/python/samba/tests/xattr.py +++ b/python/samba/tests/xattr.py @@ -17,7 +17,9 @@ """Tests for samba.xattr_native and samba.xattr_tdb.""" -import samba.xattr_native, samba.xattr_tdb, samba.posix_eadb +import samba.xattr_native +import samba.xattr_tdb +import samba.posix_eadb from samba.xattr import copytree_with_xattrs from samba.dcerpc import xattr from samba.ndr import ndr_pack diff --git a/script/autobuild.py b/script/autobuild.py index 4f895e97f3a..542d566b83b 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -5,7 +5,10 @@ from __future__ import print_function from subprocess import call, check_call, Popen, PIPE -import os, tarfile, sys, time +import os +import tarfile +import sys +import time from optparse import OptionParser import smtplib import email diff --git a/script/bisect-test.py b/script/bisect-test.py index cdfc93bdb8a..7896742747c 100755 --- a/script/bisect-test.py +++ b/script/bisect-test.py @@ -5,7 +5,9 @@ from subprocess import call, check_call, Popen, PIPE -import os, tempfile, sys +import os +import tempfile +import sys from optparse import OptionParser parser = OptionParser() diff --git a/source3/script/tests/test_wbinfo_sids2xids_int.py b/source3/script/tests/test_wbinfo_sids2xids_int.py index 6c2b552f62c..a3cc3901d74 100755 --- a/source3/script/tests/test_wbinfo_sids2xids_int.py +++ b/source3/script/tests/test_wbinfo_sids2xids_int.py @@ -1,7 +1,9 @@ #!/usr/bin/env python from __future__ import print_function -import sys, os, subprocess +import sys +import os +import subprocess if len(sys.argv) != 3: diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 2a05212103a..ed241f002da 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -18,7 +18,8 @@ # three separated by newlines. All other lines in the output are considered # comments. -import os, sys +import os +import sys sys.path.insert(0, os.path.normpath(os.path.join(os.path.dirname(__file__), "../../selftest"))) import selftesthelpers from selftesthelpers import * diff --git a/source4/script/depfilter.py b/source4/script/depfilter.py index 5af26a6eb00..ffe628ef94c 100755 --- a/source4/script/depfilter.py +++ b/source4/script/depfilter.py @@ -7,7 +7,8 @@ # Command line stuff from __future__ import print_function -import sys, sre +import sys +import sre if len(sys.argv) != 2: print('Usage: depfilter.py NODE') diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index ca2f358989c..2a340155c8f 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -19,7 +19,8 @@ # comments. from __future__ import print_function -import os, sys +import os +import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../../selftest")) import selftesthelpers from selftesthelpers import * diff --git a/source4/torture/drs/python/delete_object.py b/source4/torture/drs/python/delete_object.py index 5cc0c2877c8..81508b494ae 100644 --- a/source4/torture/drs/python/delete_object.py +++ b/source4/torture/drs/python/delete_object.py @@ -34,7 +34,8 @@ from ldb import ( SCOPE_SUBTREE, ) -import drs_base, ldb +import drs_base +import ldb class DrsDeleteObjectTestCase(drs_base.DrsBaseTestCase): diff --git a/source4/torture/drs/python/repl_move.py b/source4/torture/drs/python/repl_move.py index f07deeaa71c..d5cb3ede4c2 100644 --- a/source4/torture/drs/python/repl_move.py +++ b/source4/torture/drs/python/repl_move.py @@ -42,7 +42,8 @@ from ldb import ( SCOPE_SUBTREE, ) -import drs_base, ldb +import drs_base +import ldb from samba.dcerpc.drsuapi import * diff --git a/source4/torture/drs/python/ridalloc_exop.py b/source4/torture/drs/python/ridalloc_exop.py index 26b1166ee49..82aea1108b9 100644 --- a/source4/torture/drs/python/ridalloc_exop.py +++ b/source4/torture/drs/python/ridalloc_exop.py @@ -39,7 +39,9 @@ from samba.dcerpc import drsuapi, misc from samba.drs_utils import drs_DsBind from samba.samdb import SamDB -import shutil, tempfile, os +import shutil +import tempfile +import os from samba.auth import system_session, admin_session from samba.dbchecker import dbcheck from samba.ndr import ndr_pack diff --git a/wintest/test-s3.py b/wintest/test-s3.py index d1139b603c6..1c013e908a7 100755 --- a/wintest/test-s3.py +++ b/wintest/test-s3.py @@ -2,7 +2,8 @@ '''automated testing of Samba3 against windows''' -import sys, os +import sys +import os import optparse import wintest diff --git a/wintest/test-s4-howto.py b/wintest/test-s4-howto.py index 705f248ebae..db847a67818 100755 --- a/wintest/test-s4-howto.py +++ b/wintest/test-s4-howto.py @@ -2,8 +2,12 @@ '''automated testing of the steps of the Samba4 HOWTO''' -import sys, os -import wintest, pexpect, time, subprocess +import sys +import os +import wintest +import pexpect +import time +import subprocess def set_krb5_conf(t): diff --git a/wintest/wintest.py b/wintest/wintest.py index cb95bdfbfb8..e414d75dc5b 100644 --- a/wintest/wintest.py +++ b/wintest/wintest.py @@ -2,9 +2,13 @@ '''automated testing library for testing Samba against windows''' -import pexpect, subprocess +import pexpect +import subprocess import optparse -import sys, os, time, re +import sys +import os +import time +import re class wintest(): |