def setup_dir(self):
        """Change directory for script if necessary."""
        cd = self.opts.cd or self.config['crony'].get('directory')
        if cd:
            self.logger.debug(f'Adding cd to {cd}')
            self.cmd = f'cd {cd} && {self.cmd}'
def setup_dir ( self ) : cd = self . opts . cd or self . config [ 'crony' ] . get ( 'directory' ) if cd : self . logger . debug ( f'Adding cd to {cd}' ) self . cmd = f'cd {cd} && {self.cmd}'
Change directory for script if necessary.