summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python')
-rwxr-xr-xsource4/scripting/python/samba/upgradehelpers.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/scripting/python/samba/upgradehelpers.py b/source4/scripting/python/samba/upgradehelpers.py
index a588a84346..7b09d4a441 100755
--- a/source4/scripting/python/samba/upgradehelpers.py
+++ b/source4/scripting/python/samba/upgradehelpers.py
@@ -886,3 +886,14 @@ def search_constructed_attrs_stored(samdb, rootdn, attrs):
hashAtt[att][str(ent.dn).lower()] = str(ent[att])
return hashAtt
+
+def int64range2str(value):
+ """Display the int64 range stored in value as xxx-yyy
+
+ :param value: The int64 range
+ :return: A string of the representation of the range
+ """
+
+ lvalue = long(value)
+ str = "%d-%d" % (lvalue&0xFFFFFFFF, lvalue>>32)
+ return str