把
#构造排除 def get_exclude(self,exclude = []): if not exclude: tmp_exclude = os.getenv('BT_EXCLUDE') if tmp_exclude: exclude = tmp_exclude.split(',') if not exclude: return "" for ex in exclude: self._exclude += " --exclude=\"" + ex + "\"" self._exclude += " " return self._exclude
换成
# 构造排除 def get_exclude(self, exclude=[]): self._exclude = "" if not exclude: tmp_exclude = os.getenv('BT_EXCLUDE') if tmp_exclude: exclude = tmp_exclude.split(',') if not exclude: return "" for ex in exclude: if ex[-1] == '/': ex = ex[:-1] self._exclude += " --exclude=\"" + ex + "\"" self._exclude += " " return self._exclude