| Total Complexity | 3 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Changes | 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 args(sub): |
||
| 13 | # fmt:off |
||
| 14 | pass |
||
| 15 | # fmt:on |
||
| 16 | |||
| 17 | |||
| 18 | def main(): |
||
| 19 | parser = argparse.ArgumentParser(description=sys.modules[__name__].__doc__) |
||
| 20 | args(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 |