gauteh/lieer

Exclude voicemail label in push

learmj opened this issue · 4 comments

Hi. I hit an error trying to push the voicemail tag / label to gmail. I added it to the currently excluded labels in lieer/local.py and it resolved the problem. Here's a back trace:
push: creating label: voicemail.. Traceback (most recent call last): File "/usr/local/bin/gmi", line 8, in <module> g.main () File "/b/git/gmailieer/lieer/gmailieer.py", line 143, in main args.func (args) File "/b/git/gmailieer/lieer/gmailieer.py", line 193, in sync self.push (args, True) File "/b/git/gmailieer/lieer/gmailieer.py", line 246, in push actions.append (self.remote.update (rm, nm, self.local.state.last_historyId, self.force)) File "/b/git/gmailieer/lieer/remote.py", line 110, in func_wrap return func (self, *args, **kwargs) File "/b/git/gmailieer/lieer/remote.py", line 518, in update return self.__push_tags__ (gid, add, rem) File "/b/git/gmailieer/lieer/remote.py", line 110, in func_wrap return func (self, *args, **kwargs) File "/b/git/gmailieer/lieer/remote.py", line 534, in __push_tags__ (lid, ll) = self.__create_label__ (a) File "/b/git/gmailieer/lieer/remote.py", line 110, in func_wrap return func (self, *args, **kwargs) File "/b/git/gmailieer/lieer/remote.py", line 651, in __create_label__ lr = self.service.users ().labels ().create (userId = self.account, body = label).execute () File "/home/xxx/.local/lib/python3.5/site-packages/oauth2client/_helpers.py", line 133, in positional_wrapper return wrapped(*args, **kwargs) File "/home/xxx/.local/lib/python3.5/site-packages/googleapiclient/http.py", line 841, in execute raise HttpError(resp, content, uri=self.uri) googleapiclient.errors.HttpError: <HttpError 400 when requesting https://www.googleapis.com/gmail/v1/users/xxx/labels?alt=json returned "Invalid label name">
Can you commit this to master please?
Thanks :-)
-- Matt

Diff was this:
`diff --git a/lieer/local.py b/lieer/local.py
index 6ddf7e6..47792a6 100644
--- a/lieer/local.py
+++ b/lieer/local.py
@@ -37,6 +37,7 @@ class Local:
'mute',
'todo',
'Trash',

  •                    'voicemail',
                       ])
    

    class RepositoryException (Exception):`

Code markup is obviously not good for patches!

Thanks, best is a PR (with the specific label added to the list in the README as well) or git format-patch patches.

Fixed in master, thanks.