Changeset 130adbe2f7b21a1f7411f4c06867006e259177c4
- Timestamp:
- 11/28/07 18:48:30
(1 year ago)
- Author:
- Jason Michalski <armooo@armooo.net>
- git-committer:
- Jason Michalski <armooo@armooo.net> 1196297310 -0600
- git-parent:
[d49819f39a81972d744a39a9eea42c63b5b455f4]
- git-author:
- Jason Michalski <armooo@armooo.net> 1196297310 -0600
- Message:
Don't crash without a neteork
Catch the exception if there is no network currently avaliable.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r8698247 |
r130adbe |
|
| 26 | 26 | beacon.append('identity=%s' % guid) |
|---|
| 27 | 27 | |
|---|
| 28 | | import socket |
|---|
| 29 | | beacon.append('machine=%s' % socket.gethostname()) |
|---|
| | 28 | beacon.append('machine=%s' % gethostname()) |
|---|
| 30 | 29 | beacon.append('platform=pc') |
|---|
| 31 | 30 | beacon.append('services=' + self.format_services()) |
|---|
| … | … | |
| 36 | 35 | beacon_ips = config.getBeaconAddreses() |
|---|
| 37 | 36 | for beacon_ip in beacon_ips.split(): |
|---|
| 38 | | self.UDPSock.sendto(self.format_beacon(), (beacon_ip, 2190)) |
|---|
| | 37 | try: |
|---|
| | 38 | self.UDPSock.sendto(self.format_beacon(), (beacon_ip, 2190)) |
|---|
| | 39 | except error: |
|---|
| | 40 | pass |
|---|
| 39 | 41 | |
|---|
| 40 | 42 | def start(self): |
|---|