Philipp Hörist pushed to branch gajim_1.1 at gajim / gajim
Commits:
-
72b8c0ab
by Philipp Hörist at 2019-04-06T07:34:31Z
-
5f562fb0
by Philipp Hörist at 2019-04-06T07:34:50Z
1 changed file:
Changes:
| ... | ... | @@ -23,7 +23,7 @@ import struct |
| 23 | 23 |
import hashlib
|
| 24 | 24 |
import os
|
| 25 | 25 |
import time
|
| 26 |
-import platform
|
|
| 26 |
+import sys
|
|
| 27 | 27 |
import logging
|
| 28 | 28 |
from errno import EWOULDBLOCK
|
| 29 | 29 |
from errno import ENOBUFS
|
| ... | ... | @@ -296,7 +296,7 @@ class SocksQueue: |
| 296 | 296 |
def activate_proxy(self, idx):
|
| 297 | 297 |
if not self.isHashInSockObjs(self.senders, idx):
|
| 298 | 298 |
return
|
| 299 |
- for key in self.senders:
|
|
| 299 |
+ for key in list(self.senders):
|
|
| 300 | 300 |
if idx in key:
|
| 301 | 301 |
sender = self.senders[key]
|
| 302 | 302 |
if sender.file_props.type_ != 's':
|
| ... | ... | @@ -1436,7 +1436,7 @@ class Socks5Listener(IdleObject): |
| 1436 | 1436 |
# Under windows Vista, we need that to listen on ipv6 AND ipv4
|
| 1437 | 1437 |
# Doesn't work under windows XP
|
| 1438 | 1438 |
if os.name == 'nt':
|
| 1439 |
- if int(platform.win32_ver()[0]) >= 6: # Win Vista +
|
|
| 1439 |
+ if sys.getwindowsversion().major >= 6: # Win Vista +
|
|
| 1440 | 1440 |
# 47 is socket.IPPROTO_IPV6
|
| 1441 | 1441 |
# 27 is socket.IPV6_V6ONLY under windows, but not defined ...
|
| 1442 | 1442 |
self._serv.setsockopt(41, 27, 0)
|