예제 #1
0
파일: pm.py 프로젝트: 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)
예제 #2
0
파일: pm.py 프로젝트: Kampi/Zybo-Linux
 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)
예제 #3
0
파일: pm.py 프로젝트: machida-yuki/smart2
    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)
예제 #4
0
파일: pm.py 프로젝트: teppeitherock/smart2
    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)