1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-21 20:23:50 +03:00

python/samba: Py2/Py3 compat change '/' to '//' to ensure int result

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Alexander Bokovoy <ab@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon Apr 30 18:25:25 CEST 2018 on sn-devel-144
This commit is contained in:
Noel Power
2018-04-27 08:15:28 +01:00
committed by Noel Power
parent 141d9081f4
commit 268ad19eee
3 changed files with 7 additions and 4 deletions

View File

@@ -23,6 +23,7 @@
#
from __future__ import print_function
from __future__ import division
import samba.getopt as options
import ldb
import string
@@ -2331,7 +2332,7 @@ class cmd_domain_trust_create(DomainTrustCommand):
# 512 bytes and a 2 bytes confounder is required.
#
def random_trust_secret(length):
pw = samba.generate_random_machine_password(length/2, length/2)
pw = samba.generate_random_machine_password(length//2, length//2)
return string_to_byte_array(pw.encode('utf-16-le'))
if local_trust_info.trust_direction & lsa.LSA_TRUST_DIRECTION_INBOUND: