@@ -415,7 +415,7 @@ def __init__(self, log, user, token, base_url, admin_path, timeout, debug,
415415 self .user = user
416416
417417 def user_list (self , _from , _limit , _guests , _deactivated ,
418- _name , _user_id , _admin ):
418+ _name , _user_id , _admin = None ):
419419 """List and search users
420420
421421 Args:
@@ -446,7 +446,7 @@ def user_list(self, _from, _limit, _guests, _deactivated,
446446 return self .query ("get" , "v2/users" , params = params )
447447
448448 def user_list_paginate (self , _limit , _guests , _deactivated ,
449- _name , _user_id , _from = "0" ):
449+ _name , _user_id , _from = "0" , admin = None ):
450450 # documentation is mostly duplicated from user_list...
451451 """Yields API responses for all of the pagination.
452452
@@ -468,7 +468,7 @@ def user_list_paginate(self, _limit, _guests, _deactivated,
468468 """
469469 while _from is not None :
470470 response = self .user_list (_from , _limit , _guests , _deactivated ,
471- _name , _user_id )
471+ _name , _user_id , admin )
472472 yield response
473473 _from = response .get ("next_token" , None )
474474
@@ -1345,7 +1345,7 @@ def notice_send(self, receivers, content_plain, content_html, paginate,
13451345 # A regular expression was supplied to match receivers.
13461346 if regex :
13471347 outputs = []
1348- response = self .user_list (0 , paginate , True , False , "" , "" )
1348+ response = self .user_list (0 , paginate , True , False , "" , "" , None )
13491349 if "users" not in response :
13501350 return
13511351 while True :
@@ -1361,7 +1361,7 @@ def notice_send(self, receivers, content_plain, content_html, paginate,
13611361 if "next_token" not in response :
13621362 return outputs
13631363 response = self .user_list (response ["next_token" ],
1364- 100 , True , False , "" , "" )
1364+ 100 , True , False , "" , "" , None )
13651365 # Only a single user ID was supplied as receiver
13661366 else :
13671367 data ["user_id" ] = receivers
0 commit comments