1. Python / Говнокод #18652

    −11

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    def ex(self,e,txt):
            s=self
            s.log.debug(txt)
            s.log.error('{} {}'.format(e.__class__.__name__,e.message))
            s.err=+1
    
        def doIt(self, files):
            s=self
            if not s._iec:
                try:
                    IOStream = serial.Serial(s._port_name,
                                             baudrate=19200,
                                             bytesize=8,
                                             parity='N',
                                             stopbits=1,
                                             timeout=5)
                except serial.SerialException as e:
                    s.ex(e,sys._getframe(0).f_code.co_name)
                    return
            else:
                iec_opening = s.IECOpening(s._port_name, s._iec_parameters)
                IOStream = iec_opening.IOStream
            s._hdlc = HDLCProtocol(self._hdlcParamaters, IOStream=IOStream)
            s.show_info()
            try:
                s._hdlc.connect()
            except icube.ezhdlc.ezhdlcexception.EzHdlcException as e:
                s.ex(e,sys._getframe(0).f_code.co_name)
                return

    Не могу без смеха на это дерьмо смотреть!

    Запостил: n158, 31 Августа 2015

    Комментарии (1) RSS

    Добавить комментарий