Browse Source

Исправлен запуск emerge --metadata. Добавлено логгирование

master3.3
Mike khiretskiy 8 years ago
parent
commit
d28b4d7de4
  1. 8
      update/update.py

8
update/update.py

@ -234,11 +234,15 @@ class Update:
if not emerge:
raise UpdateError(_("The Emerge tool is not found"))
self.addProgress()
p = PercentProgress(emerge, "--metadata", part=1, atty=True)
p = PercentProgress(emerge, "--ask=n", "--metadata", part=1, atty=True)
for perc in p.progress():
self.setProgress(perc)
if p.failed():
raise UpdateError(_("Failed to update metadata"), addon=p.read())
data = p.read()
with open('/var/log/calculate/failed-metadata-%d.log' % time.time(),
'w') as f:
f.write(data+p.alldata)
raise UpdateError(_("Failed to update metadata"), addon=data)
return True
def eixUpdate(self):

Loading…
Cancel
Save