|
|
|
@ -3,6 +3,7 @@ import select |
|
|
|
import socket |
|
|
|
import socket |
|
|
|
import threading |
|
|
|
import threading |
|
|
|
import random |
|
|
|
import random |
|
|
|
|
|
|
|
import config |
|
|
|
from Queue import Queue, Empty |
|
|
|
from Queue import Queue, Empty |
|
|
|
|
|
|
|
|
|
|
|
MAGIC_PACKET = "" |
|
|
|
MAGIC_PACKET = "" |
|
|
|
@ -77,7 +78,7 @@ def get_local_ip(): |
|
|
|
try: |
|
|
|
try: |
|
|
|
address = queue.get(False) |
|
|
|
address = queue.get(False) |
|
|
|
except Empty: |
|
|
|
except Empty: |
|
|
|
pass |
|
|
|
address = [config.IP] |
|
|
|
else: |
|
|
|
finally: |
|
|
|
waiting = False |
|
|
|
waiting = False |
|
|
|
return address[0] |
|
|
|
return address[0] |
|
|
|
|