Open Bug 1797083 Opened 3 years ago Updated 3 months ago

KeyError: 'nick' when running `mots clean` after first adding new person

Categories

(Conduit :: mots, defect, P2)

Tracking

(Not tracked)

People

(Reporter: zeid, Assigned: zeid)

Details

(Keywords: conduit-triaged)

Attachments

(1 file)

47 bytes, text/x-github-pull-request
Details | Review

A second run works fine, but the first run crashes with the below:

Traceback (most recent call last):                                                                                                                                                         
  File "/Users/zeid/src/mots/src/mots/cli.py", line 255, in main                                                                                                                           
    args.func(args)                                                                                                                                                                        
  File "/Users/zeid/src/mots/src/mots/cli.py", line 65, in clean                                                                                                                           
    config.clean(file_config)                                                                                                                                                              
  File "/Users/zeid/src/mots/src/mots/config.py", line 202, in clean                                                                                                                       
    file_config.config["people"].sort(key=lambda p: p["nick"].lower())                                                                                                                     
  File "/Users/zeid/src/mots/.mots-env/lib/python3.10/site-packages/ruamel/yaml/comments.py", line 644, in sort                                                                            
    tmp_lst = sorted(                                                                                                                                                                      
  File "/Users/zeid/src/mots/src/mots/config.py", line 202, in <lambda>                                                                                                                    
    file_config.config["people"].sort(key=lambda p: p["nick"].lower())                                                                                                                     
  File "/Users/zeid/src/mots/.mots-env/lib/python3.10/site-packages/ruamel/yaml/comments.py", line 927, in __getitem__
    return ordereddict.__getitem__(self, key)
KeyError: 'nick'                              
Priority: -- → P2
Severity: -- → S3
Keywords: conduit-triaged
Attached file GitHub Pull Request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: