• Adrian Reber's avatar
    crit: display help message when using python3 · 681c0539
    Adrian Reber authored
    Running crit with python2 gives following minimal help message:
    
     $ crit/crit
     usage: crit [-h] {decode,encode,info,x,show} ...
     crit: error: too few arguments
    
    Using a python3 only system crit shows the following error:
    
     $ crit/crit
     Traceback (most recent call last):
       File "crit/crit", line 6, in <module>
         cli.main()
       File "/home/criu/crit/pycriu/cli.py", line 334, in main
         opts["func"](opts)
     KeyError: 'func'
    
    Using this patch the python3 output changes to:
    
     $ crit/crit
     usage: crit [-h] {decode,encode,info,x,show} ...
     crit: error: too few arguments
    Suggested-by: 's avatarAndrei Vagin <avagin@gmail.com>
    Signed-off-by: 's avatarAdrian Reber <areber@redhat.com>
    681c0539
cli.py 8.71 KB