Conditions | 5 |
Total Lines | 17 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import errno |
||
40 | def fetch_new_messages(self): |
||
41 | new_messages = [] |
||
42 | |||
43 | try: |
||
44 | while True: |
||
45 | self.retrieve_next_message(new_messages) |
||
46 | |||
47 | except IOError as e: |
||
48 | if e.errno not in [errno.EAGAIN, errno.EWOULDBLOCK]: |
||
49 | print("reading error", str(e)) |
||
50 | sys.exit() |
||
51 | |||
52 | return new_messages |
||
53 | |||
54 | except Exception as e: |
||
55 | print("general error", str(e)) |
||
56 | sys.exit() |
||
57 |