# -*- coding: utf-8 -*- from .__load__ import * # 备份 class Backup(object): def __init__(self): self.path = Demeter.config['admin']['online_path'] def update(self): path = self.web files = File.getFiles(path) if files: for i in files: file = path + i + '/.git/' if File.exists(file): self.pull(path, i, file) def pull(self, path, name, file): path = path + name + '/' Shell.popen('cd ' + path + ' && git pull')