Changeset fa9915f995fc342fcce741ebe5502b0e4a09a001 for pxe/common.py
- Timestamp:
- 12/09/09 15:46:16 (2 years ago)
- Children:
- 74c3d1b1c53af237e622f28e0595b9fb76106d59
- Parents:
- e5e582bfb02593a628c358d97bd630ff91da7f41
- git-committer:
- Frederic Lepied <frederic.lepied@…> (12/09/09 15:46:16)
- Files:
-
- 1 modified
-
pxe/common.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pxe/common.py
re5e582b rfa9915f 14 14 from models import * 15 15 16 MAC_REGEXP = re.compile('^.*\s([0-9 A-F:]+)\s.*')17 IP_REGEXP = re.compile('^([0-9.]+).*\s[0-9 A-F:]+\s.*')16 MAC_REGEXP = re.compile('^.*\s([0-9a-f:]+)\s.*', re.I) 17 IP_REGEXP = re.compile('^([0-9.]+).*\s[0-9a-f:]+\s.*', re.I) 18 18 19 19 def ip_to_mac(ip): … … 37 37 mac = ip_to_mac(request.META['REMOTE_ADDR']) 38 38 if not mac: 39 print 'no mac for', request.META['REMOTE_ADDR'] 39 40 raise Http404 40 41 return mac
