@@ -317,7 +317,6 @@ def _resolve_authorized(self, pw):
317
317
continue
318
318
file_names .add (line [6 :])
319
319
320
- global maintainers
321
320
maintainer_matches = maintainers .find_by_paths (file_names ).find_by_owner (self .msg .get ('From' ))
322
321
if len (maintainer_matches ):
323
322
self ._authorized = repr (maintainer_matches )
@@ -340,7 +339,6 @@ def auto_awaiting_upstream(self):
340
339
return False
341
340
tags = subject [1 :tags_end ]
342
341
343
- global auto_awaiting_upstream
344
342
for designation in auto_awaiting_upstream :
345
343
if designation in tags :
346
344
return True
@@ -538,7 +536,6 @@ def handler(signum, _):
538
536
539
537
540
538
def pw_state_log (fields ):
541
- global config
542
539
log_name = config .get ('mailbot' , 'change-log' )
543
540
if not log_name :
544
541
return
@@ -551,8 +548,6 @@ def pw_state_log(fields):
551
548
552
549
553
550
def weak_act_should_ignore (msg , series , want ):
554
- global pw_act_active
555
-
556
551
if msg .user_authorized ():
557
552
return None
558
553
current = series .state ()
@@ -652,7 +647,6 @@ def do_mail_file(msg_path, pw, dr):
652
647
try :
653
648
do_mail (msg , pw , dr )
654
649
except MlDelayActions as e :
655
- global delay_actions
656
650
msg .flush_actions () # avoid duplicates, actions will get re-parsed
657
651
delay_actions .append ((e .when , msg , ))
658
652
@@ -717,15 +711,12 @@ def main():
717
711
if ua :
718
712
http_headers = {"user-agent" :ua }
719
713
720
- global authorized_users
721
714
users = config .get ('mailbot' , 'authorized' )
722
715
authorized_users .update (set (users .split (',' )))
723
716
724
- global auto_changes_requested
725
717
users = config .get ('mailbot' , 'error-bots' )
726
718
auto_changes_requested .update (set (users .split (',' )))
727
719
728
- global auto_awaiting_upstream
729
720
users = config .get ('mailbot' , 'awaiting-upstream' )
730
721
auto_awaiting_upstream .update (set (users .split (',' )))
731
722
@@ -746,7 +737,6 @@ def main():
746
737
doc_load_time = datetime .datetime .fromtimestamp (0 )
747
738
dr = None
748
739
749
- global should_stop
750
740
while not should_stop :
751
741
req_time = datetime .datetime .now ()
752
742
0 commit comments