def mkdir(self, remote_dir): with settings(host_string=self.int_ip): run(' [ -d {0} ] || mkdir -p {0} '.format(remote_dir))