346773f7902b45280568cf1e8913e7aad815c8c9,pwnagotchi/plugins/default/auto-backup.py,AutoBackup,on_loaded,#AutoBackup#,18

Before Change



    def on_loaded(self):
        if "files" not in self.options or ("files" in self.options and self.options["files"] is None):
            logging.error("AUTO-BACKUP: No files to backup.")
            return

        if "interval" not in self.options or ("interval" in self.options and self.options["interval"] is None):
            logging.error("AUTO-BACKUP: Interval is not set.")

After Change


        self.status = StatusFile("/root/.auto-backup")

    def on_loaded(self):
        for opt in ["files", "interval", "commands", "max_tries"]:
            if opt not in self.options or (opt in self.options and self.options[opt] is None):
                logging.error(f"AUTO-BACKUP: Option {opt} is not set.")
                return

        self.ready = True
        logging.info("AUTO-BACKUP: Successfully loaded.")

    def on_internet_available(self, agent):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: evilsocket/pwnagotchi
Commit Name: 346773f7902b45280568cf1e8913e7aad815c8c9
Time: 2019-11-05
Author: 33197631+dadav@users.noreply.github.com
File Name: pwnagotchi/plugins/default/auto-backup.py
Class Name: AutoBackup
Method Name: on_loaded


Project Name: microsoft/nni
Commit Name: 08af7771d1f1149f3da5a98bcdbf7e65abd409ba
Time: 2020-12-27
Author: Quanlu.Zhang@microsoft.com
File Name: nni/retiarii/strategies/tpe_strategy.py
Class Name: TPEStrategy
Method Name: run


Project Name: dmlc/gluon-nlp
Commit Name: aeb516494daa207720b428072ab49eeea7bfff75
Time: 2019-06-13
Author: xshiab@ust.hk
File Name: scripts/text_generation/sequence_sampling.py
Class Name:
Method Name: