Commit d1c04080853a84d64d90c15b984f38a176d802b0

Authored by Gust
Committed by Sergio Oliveira
1 parent 7128a979

Fix flake8

Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Signed-off-by: Alexandre Barbosa <alexandreab@live.com>
colab/accounts/utils/mailman.py
@@ -48,9 +48,11 @@ def update_subscription(address, lists): @@ -48,9 +48,11 @@ def update_subscription(address, lists):
48 if maillist not in current_lists: 48 if maillist not in current_lists:
49 subscribe(maillist, address) 49 subscribe(maillist, address)
50 50
  51 +
51 def address_lists(address): 52 def address_lists(address):
52 return mailing_lists(address=address) 53 return mailing_lists(address=address)
53 54
  55 +
54 def mailing_lists(**kwargs): 56 def mailing_lists(**kwargs):
55 url = get_url() 57 url = get_url()
56 58
@@ -62,9 +64,11 @@ def mailing_lists(**kwargs): @@ -62,9 +64,11 @@ def mailing_lists(**kwargs):
62 64
63 return lists.json() 65 return lists.json()
64 66
  67 +
65 def is_private_list(name): 68 def is_private_list(name):
66 return dict(all_lists(private=True))[name] 69 return dict(all_lists(private=True))[name]
67 70
  71 +
68 def all_lists(*args, **kwargs): 72 def all_lists(*args, **kwargs):
69 return mailing_lists(*args, **kwargs) 73 return mailing_lists(*args, **kwargs)
70 74
colab/super_archives/management/commands/import_emails.py
@@ -298,4 +298,4 @@ class Command(BaseCommand, object): @@ -298,4 +298,4 @@ class Command(BaseCommand, object):
298 298
299 for mlist in MailingList.objects.all(): 299 for mlist in MailingList.objects.all():
300 mlist.update_privacy() 300 mlist.update_privacy()
301 - mlist.save()  
302 \ No newline at end of file 301 \ No newline at end of file
  302 + mlist.save()
colab/super_archives/views.py
@@ -122,10 +122,8 @@ class ThreadDashboardView(View): @@ -122,10 +122,8 @@ class ThreadDashboardView(View):
122 def get(self, request): 122 def get(self, request):
123 MAX = 6 123 MAX = 6
124 context = {} 124 context = {}
125 - all_lists = mailman.all_lists(description=True)  
126 all_privates = dict(mailman.all_lists(private=True)) 125 all_privates = dict(mailman.all_lists(private=True))
127 126
128 -  
129 context['lists'] = [] 127 context['lists'] = []
130 128
131 user = User.objects.get(username=request.user) 129 user = User.objects.get(username=request.user)