gauteh / lieer

Fast email-fetching, sending, and two-way tag synchronization between notmuch and GMail
http://lieer.gaute.vetsj.com
Other
555 stars 62 forks source link

Do not fail if new.tags is empty #223

Closed julian-klode closed 2 years ago

julian-klode commented 2 years ago

An empty option is not represented in the dict-like notmuch2 config structure, so ignore missing new.tags.

julian-klode commented 2 years ago

This fixes:

Traceback (most recent call last):                                                                                                                                                                                                                                                          
  File "/usr/bin/gmi", line 24, in <module>                                                                                                                                                                                                                                                 
    g.main ()                                                                                                                                                                                                                                                                               
  File "/usr/share/lieer/lieer/gmailieer.py", line 219, in main                                                                                                                                                                                                                             
    args.func (args)                                                                                                                                                                                                                                                                        
  File "/usr/share/lieer/lieer/gmailieer.py", line 289, in sync                                                                                                                                                                                                                             
    self.setup (args, args.dry_run, True)
  File "/usr/share/lieer/lieer/gmailieer.py", line 285, in setup
    self.local.load_repository (block)
  File "/usr/share/lieer/lieer/local.py", line 357, in load_repository
    self.new_tags = db.config["new.tags"].split(';')
  File "/usr/lib/python3/dist-packages/notmuch2/_config.py", line 75, in __getitem__
    raise KeyError
KeyError
gauteh commented 2 years ago

Thanks, looks good. Does lieer work for you despite https://github.com/gauteh/lieer/issues/215?

julian-klode commented 2 years ago

Yes, it still works.

gauteh commented 2 years ago

Great :+1: