YueChen-C / py-ios-device

IOS Professional Performance Testing Tool . You can get CPU, GPU, Memory , Lifecycle and other metrics from real iOS devices . IOS 专业性能测试工具
GNU General Public License v3.0
634 stars 179 forks source link

Fix TypeError during rise error #82

Closed NeverDieOne closed 1 year ago

NeverDieOne commented 1 year ago

Sometimes we got an error.

    def connect(self, device, port) -> socket.socket:
        ret = self.exchange(
            self.proto.TYPE_CONNECT, {'DeviceID': device, 'PortNumber': ((port & 0xFF) << 8) | (port >> 8)}
        )
        if ret['Number'] != 0:
>           raise MuxError('Connect failed: error %d' % ret)
E           TypeError: %d format: a real number is required, not dict