s4/scripting: python3 fix string.find instance
authorNoel Power <noel.power@suse.com>
Tue, 11 Dec 2018 12:17:59 +0000 (12:17 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 13 Dec 2018 23:51:33 +0000 (00:51 +0100)
    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>
source4/scripting/bin/rpcclient

index cbab0d5..cabd2e3 100755 (executable)
@@ -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