|
Lines 1-4
Link Here
|
| 1 |
#!/usr/bin/python2.7 |
1 |
#!/usr/bin/env python3 |
| 2 |
# vim: set fileencoding=utf-8 filetype=python foldmethod=expr expandtab shiftwidth=4 tabstop=4 : |
2 |
# vim: set fileencoding=utf-8 filetype=python foldmethod=expr expandtab shiftwidth=4 tabstop=4 : |
| 3 |
""" |
3 |
""" |
| 4 |
Univention Directory Notifier Transaction log admin commmand |
4 |
Univention Directory Notifier Transaction log admin commmand |
|
Lines 80-86
class IndexHeader(Structure):
Link Here
|
| 80 |
The header is architecture dependant due to the use of `c_ulong`. |
80 |
The header is architecture dependant due to the use of `c_ulong`. |
| 81 |
""" |
81 |
""" |
| 82 |
MAGIC = 0x3395e0d4L |
82 |
MAGIC = 0x3395e0d4 |
| 83 |
_fields_ = [("magic", c_ulong)] |
83 |
_fields_ = [("magic", c_ulong)] |
| 84 |
_pack_ = 1 |
84 |
_pack_ = 1 |
|
Lines 1387-1393
def parse_size(string):
Link Here
|
| 1387 |
suffix = string.lstrip(".0123456789") |
1387 |
suffix = string.lstrip(".0123456789") |
| 1388 |
try: |
1388 |
try: |
| 1389 |
unit, = suffix.rstrip("iIbB").upper() or ' ' |
1389 |
unit, = suffix.rstrip("iIbB").upper() or ' ' |
| 1390 |
scale = 1L << (10 * " KMGTPE".index(unit)) |
1390 |
scale = 1 << (10 * " KMGTPE".index(unit)) |
| 1391 |
except ValueError: |
1391 |
except ValueError: |
| 1392 |
raise ArgumentTypeError("Invalid unit") |
1392 |
raise ArgumentTypeError("Invalid unit") |