mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
kcc: Don't check schedule if None
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12286 Signed-off-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Fri Sep 23 06:52:28 CEST 2016 on sn-devel-144
This commit is contained in:
parent
bff3e5efba
commit
60e4bd381a
@ -1214,11 +1214,19 @@ class NTDSConnection(object):
|
|||||||
|
|
||||||
:param shed: schedule to compare to
|
:param shed: schedule to compare to
|
||||||
"""
|
"""
|
||||||
if self.schedule is not None:
|
# There are 4 cases, where either self.schedule or sched can be None
|
||||||
|
#
|
||||||
|
# | self. is None | self. is not None
|
||||||
|
# --------------+-----------------+--------------------
|
||||||
|
# sched is None | True | False
|
||||||
|
# --------------+-----------------+--------------------
|
||||||
|
# sched is not None | False | do calculations
|
||||||
|
|
||||||
|
if self.schedule is None:
|
||||||
|
return sched is None
|
||||||
|
|
||||||
if sched is None:
|
if sched is None:
|
||||||
return False
|
return False
|
||||||
elif sched is None:
|
|
||||||
return True
|
|
||||||
|
|
||||||
if ((self.schedule.size != sched.size or
|
if ((self.schedule.size != sched.size or
|
||||||
self.schedule.bandwidth != sched.bandwidth or
|
self.schedule.bandwidth != sched.bandwidth or
|
||||||
|
Loading…
x
Reference in New Issue
Block a user