1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

s4/scripting: python3 fix string.find instance

string.find doesn't exist in python3. Instead use the 'find' method
    of the string instance itself

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Noel Power
2018-12-11 12:17:59 +00:00
committed by Andrew Bartlett
parent 166d119d48
commit 9116cc8cc8

View File

@ -278,11 +278,11 @@ if __name__ == '__main__':
options.username = '%'
domain = ''
if string.find(options.username, '\\') != -1:
if options.username.find('\\') != -1:
domain, options.username = string.split(options.username, '\\')
password = ''
if string.find(options.username, '%') != -1:
if options.username.find('%') != -1:
options.username, password = string.split(options.username, '%')
username = options.username