GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 18-19 lines in 2 locations

enarksh/Controller/Schedule.py 2 locations

@@ 554-572 (lines=19) @@
551
                errors = self._test_node_run_status_of_successor(rnd_id, (enarksh.ENK_RST_ID_ERROR,), set())
552
                if errors:
553
                    message['actions'][enarksh.ENK_ACT_ID_RESTART_FAILED]['act_enabled'] = True
554
555
        elif rst_id == enarksh.ENK_RST_ID_COMPLETED:
556
            # Node has completed successfully.
557
            busy = self._test_node_run_status_of_successor(rnd_id, (enarksh.ENK_RST_ID_RUNNING,), set())
558
            if not busy:
559
                message['actions'][enarksh.ENK_ACT_ID_RESTART]['act_enabled'] = True
560
561
        elif rst_id == enarksh.ENK_RST_ID_ERROR:
562
            if node.is_complex_node():
563
                message['actions'][enarksh.ENK_ACT_ID_RESTART]['act_enabled'] = True
564
                message['actions'][enarksh.ENK_ACT_ID_RESTART_FAILED]['act_enabled'] = True
565
566
            elif node.is_simple_node():
567
                message['actions'][enarksh.ENK_ACT_ID_RESTART]['act_enabled'] = True
568
569
            else:
570
                raise Exception('Internal error.')
571
572
        else:
573
            raise Exception("Unexpected rst_id '%d'." % rst_id)
574
575
        return message
@@ 501-518 (lines=18) @@
498
                errors = self._test_node_run_status_of_successor(rnd_id, (enarksh.ENK_RST_ID_ERROR,), set())
499
                if errors:
500
                    message['actions'][enarksh.ENK_ACT_ID_RESTART_FAILED]['act_enabled'] = True
501
502
            elif rst_id == enarksh.ENK_RST_ID_QUEUED:
503
                # No actions are possible.
504
                pass
505
506
            elif rst_id == enarksh.ENK_RST_ID_RUNNING:
507
                errors = self._test_node_run_status_of_successor(rnd_id, (enarksh.ENK_RST_ID_ERROR,), set())
508
                if errors:
509
                    message['actions'][enarksh.ENK_ACT_ID_RESTART_FAILED]['act_enabled'] = True
510
511
            elif rst_id == enarksh.ENK_RST_ID_COMPLETED:
512
                message['actions'][enarksh.ENK_ACT_ID_TRIGGER]['act_enabled'] = True
513
514
            elif rst_id == enarksh.ENK_RST_ID_ERROR:
515
                message['actions'][enarksh.ENK_ACT_ID_TRIGGER]['act_enabled'] = True
516
                message['actions'][enarksh.ENK_ACT_ID_RESTART_FAILED]['act_enabled'] = True
517
518
            else:
519
                raise Exception("Unexpected rst_id '%s'." % rst_id)
520
521
            return message