X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/8c2a83d6b2a60b2bd408ccdc6d5afd6da506912f..56ac7a4a764a4251a851778df09967405aa9a930:/lib/python/Components/Ipkg.py diff --git a/lib/python/Components/Ipkg.py b/lib/python/Components/Ipkg.py index 361b136a..31889bcf 100644 --- a/lib/python/Components/Ipkg.py +++ b/lib/python/Components/Ipkg.py @@ -31,8 +31,8 @@ class IpkgComponent: def runCmd(self, cmd): print "executing", self.ipkg, cmd - self.cmd.appClosed.get().append(self.cmdFinished) - self.cmd.dataAvail.get().append(self.cmdData) + self.cmd.appClosed.append(self.cmdFinished) + self.cmd.dataAvail.append(self.cmdData) if self.cmd.execute(self.ipkg + " " + cmd): self.cmdFinished(-1) @@ -56,8 +56,8 @@ class IpkgComponent: def cmdFinished(self, retval): self.callCallbacks(self.EVENT_DONE) - self.cmd.appClosed.get().remove(self.cmdFinished) - self.cmd.dataAvail.get().remove(self.cmdData) + self.cmd.appClosed.remove(self.cmdFinished) + self.cmd.dataAvail.remove(self.cmdData) def cmdData(self, data): print "data:", data @@ -98,7 +98,10 @@ class IpkgComponent: self.callCallbacks(self.EVENT_ERROR, None) elif data.find('ipkg_download: ERROR:') == 0: self.callCallbacks(self.EVENT_ERROR, None) - elif data.find(' Configuration file') == 0: + elif data.find(' Configuration file \'') >= 0: + # Note: the config file update question doesn't end with a newline, so + # if we get multiple config file update questions, the next ones + # don't necessarily start at the beginning of a line self.callCallbacks(self.EVENT_MODIFIED, data.split(' \'', 1)[1][:-1]) def callCallbacks(self, event, param = None):