Lines 609-614
def parse(self, text):
|
Link Here
|
---|
|
609 |
raise univention.admin.uexceptions.valueError(_("Value must be a number!")) |
609 |
raise univention.admin.uexceptions.valueError(_("Value must be a number!")) |
610 |
|
610 |
|
611 |
|
611 |
|
|
|
612 |
class integerOrEmpty(integer): |
613 |
@classmethod |
614 |
def parse(self, text): |
615 |
if not text: |
616 |
return |
617 |
return super(integerOrEmpty, self).parse(text) |
618 |
|
619 |
|
612 |
class boolean(simple): |
620 |
class boolean(simple): |
613 |
|
621 |
|
614 |
""" |
622 |
""" |
Lines 1576-1582
class TimeString(simple):
|
Link Here
|
---|
|
1576 |
|
1584 |
|
1577 |
class UNIX_TimeInterval(complex): |
1585 |
class UNIX_TimeInterval(complex): |
1578 |
min_elements = 1 |
1586 |
min_elements = 1 |
1579 |
subsyntaxes = (('', integer), ('', TimeUnits)) |
1587 |
subsyntaxes = (('', integerOrEmpty), ('', TimeUnits)) |
1580 |
size = ('Half', 'Half') |
1588 |
size = ('Half', 'Half') |
1581 |
|
1589 |
|
1582 |
@classmethod |
1590 |
@classmethod |
Lines 1592-1597
class UNIX_BoundedTimeInterval(UNIX_TimeInterval):
|
Link Here
|
---|
|
1592 |
@classmethod |
1600 |
@classmethod |
1593 |
def parse(cls, texts): |
1601 |
def parse(cls, texts): |
1594 |
parsed = super(UNIX_BoundedTimeInterval, cls).parse(texts) |
1602 |
parsed = super(UNIX_BoundedTimeInterval, cls).parse(texts) |
|
|
1603 |
if parsed[0] is None: |
1604 |
return [None, None] |
1595 |
|
1605 |
|
1596 |
in_seconds = int(parsed[0]) |
1606 |
in_seconds = int(parsed[0]) |
1597 |
if len(parsed) > 1: |
1607 |
if len(parsed) > 1: |