Exemple #1
0
def parse_timestamp_arg(field, value):
    res = str(value) # Undo autoconversion.
    try:
        res = parse_timestamp(res)
    except ValueError, ex:
        if ex.args:
            o.fatal('unable to parse %s resolution "%s" (%s)'
                    % (field, value, ex))
        else:
            o.fatal('unable to parse %s resolution "%s"' % (field, value))
Exemple #2
0
def parse_timestamp_arg(field, value):
    res = str(value)  # Undo autoconversion.
    try:
        res = parse_timestamp(res)
    except ValueError, ex:
        if ex.args:
            o.fatal('unable to parse %s resolution "%s" (%s)' %
                    (field, value, ex))
        else:
            o.fatal('unable to parse %s resolution "%s"' % (field, value))
Exemple #3
0
def parse_timestamp_arg(field, value):
    res = str(value)  # Undo autoconversion.
    try:
        res = parse_timestamp(res)
    except ValueError as ex:
        if ex.args:
            o.fatal('unable to parse %s resolution "%s" (%s)' %
                    (field, value, ex))
        else:
            o.fatal('unable to parse %s resolution "%s"' % (field, value))

    if res != 1 and res % 10:
        o.fatal('%s resolution "%s" must be a power of 10' % (field, value))
    return res
Exemple #4
0
def parse_timestamp_arg(field, value):
    res = str(value) # Undo autoconversion.
    try:
        res = parse_timestamp(res)
    except ValueError as ex:
        if ex.args:
            o.fatal('unable to parse %s resolution "%s" (%s)'
                    % (field, value, ex))
        else:
            o.fatal('unable to parse %s resolution "%s"' % (field, value))

    if res != 1 and res % 10:
        o.fatal('%s resolution "%s" must be a power of 10' % (field, value))
    return res