Ejemplo n.º 1
0
Archivo: pm.py Proyecto: rprstop/rootfs
 def _process_rpmout(self, tobuffer=False):
     if self.rpmout:
         output = self.rpmout.read()
         if output or not tobuffer and self.rpmoutbuffer:
             if tobuffer:
                 self.rpmoutbuffer += output
             else:
                 output = self.rpmoutbuffer + output
                 self.rpmoutbuffer = ""
                 if self.topic and self.topic != self.lasttopic:
                     self.lasttopic = self.topic
                     iface.info(self.topic)
                 iface.info(output)
Ejemplo n.º 2
0
 def _process_rpmout(self, tobuffer=False):
     if self.rpmout:
         output = self.rpmout.read()
         if output or not tobuffer and self.rpmoutbuffer:
             if tobuffer:
                 self.rpmoutbuffer += output
             else:
                 output = self.rpmoutbuffer+output
                 self.rpmoutbuffer = ""
                 if self.topic and self.topic != self.lasttopic:
                     self.lasttopic = self.topic
                     iface.info(self.topic)
                 iface.info(output)
Ejemplo n.º 3
0
    def _process_rpmout(self, tobuffer=False):
        if self.rpmout:
            try:
                output = self.rpmout.read()
            except UnicodeDecodeError:
                #in ubuntu ,the UnicodeDecodeError always occure,no better method,just return
                #to improve
                #print "UnicodeDecodeError!!"
                return

            if output or not tobuffer and self.rpmoutbuffer:
                if tobuffer:
                    self.rpmoutbuffer += output
                else:
                    output = self.rpmoutbuffer + output
                    self.rpmoutbuffer = ""
                    if self.topic and self.topic != self.lasttopic:
                        self.lasttopic = self.topic
                        iface.info(self.topic)
                    iface.info(output)
Ejemplo n.º 4
0
    def _process_rpmout(self, tobuffer=False):
        if self.rpmout:
            try:
                output = self.rpmout.read()
            except UnicodeDecodeError:
                #in ubuntu ,the UnicodeDecodeError always occure,no better method,just return
                #to improve
                #print "UnicodeDecodeError!!"
                return

            if output or not tobuffer and self.rpmoutbuffer:
                if tobuffer:
                    self.rpmoutbuffer += output
                else:
                    output = self.rpmoutbuffer+output
                    self.rpmoutbuffer = ""
                    if self.topic and self.topic != self.lasttopic:
                        self.lasttopic = self.topic
                        iface.info(self.topic)
                    iface.info(output)