Coverage for kiertotie/dispatch.py: 0.00%

18 statements  

« prev     ^ index     » next       coverage.py v7.4.1, created at 2024-02-04 18:44:05 +00:00

1import argparse 

2import logging 

3 

4import kiertotie.tree as tree 

5import kiertotie.update as update 

6from kiertotie import log 

7 

8# lang = gettext.translation('messages', localedir='locale', languages=['de_DE']) 

9# lang.install() 

10# _ = lang.gettext # German 

11 

12 

13def verify(options: argparse.Namespace) -> int: 

14 """Later alligator.""" 

15 if options: 

16 verbose = options.verbose 

17 if verbose: 

18 logging.getLogger().setLevel(logging.DEBUG) 

19 

20 if options.span_folder_tree: 

21 code = tree.span( 

22 proxy_data_path=options.proxy, 

23 anchor_path=options.anchor_path, 

24 verbose=verbose, 

25 ) 

26 if code: 

27 log.error(f'span tree action returned with code ({code})') 

28 return code 

29 return update.process( 

30 proxy_data_path=options.proxy, 

31 anchor_path=options.anchor_path, 

32 script_path=options.update_path, 

33 verbose=verbose, 

34 ) 

35 log.error('The app did not understand what to do') # _('YES')) 

36 return 2