Coverage for mfutil/cli_tools/get_simple_hostname.py: 0%

13 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2024-11-13 15:33 +0000

1import argparse 

2import sys 

3from mfutil.net import get_simple_hostname 

4 

5DESCRIPTION = "returns the 'simple' hostname (without network domain)" 

6 

7 

8def main(): 

9 parser = argparse.ArgumentParser(description=DESCRIPTION) 

10 parser.parse_args() 

11 res = get_simple_hostname() 

12 if res is not None: 

13 print(res) 

14 else: 

15 sys.exit(1) 

16 

17 

18if __name__ == '__main__': 

19 main()