Completed
Push — master ( 0f3e04...1c5edf )
by Thomas
30:23 queued 15:11
created

exabgp.application.version.setargs()   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
# encoding: utf-8
2
3
"""exabgp current version"""
4
5
import sys
6
import argparse
7
import platform
8
9
from exabgp.version import version
10
11
12
def setargs(sub):
13
    # fmt:off
14
    pass
15
    # fmt:on
16
17
18
def main():
19
    parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__)
20
    setargs(parser)
21
    cmdline(parser.parse_args())
22
23
24
def cmdline(cmdarg):
25
    sys.stdout.write('ExaBGP : %s\n' % version)
26
    sys.stdout.write('Python : %s\n' % sys.version.replace('\n', ' '))
27
    sys.stdout.write('Uname  : %s\n' % ' '.join(platform.uname()[:5]))
28
    sys.stdout.flush()
29
30
31
if __name__ == '__main__':
32
    main()
33