summaryrefslogtreecommitdiffstats
path: root/cobbler/utils.py
diff options
context:
space:
mode:
authorMichael DeHaan <mdehaan@redhat.com>2006-09-13 15:08:25 -0400
committerJim Meyering <jim@meyering.net>2006-09-13 15:08:25 -0400
commitfca4ddb1a3364381e5eb2cf7768a4e221a31e41e (patch)
tree18adcb45558e74ad8854fa064e32b50ccc021c1a /cobbler/utils.py
parent0f58d45fa07a7b18950b988298bdf56d54bec96e (diff)
downloadthird_party-cobbler-fca4ddb1a3364381e5eb2cf7768a4e221a31e41e.tar.gz
third_party-cobbler-fca4ddb1a3364381e5eb2cf7768a4e221a31e41e.tar.xz
third_party-cobbler-fca4ddb1a3364381e5eb2cf7768a4e221a31e41e.zip
- Fixing bug that didn't allow lowercase MAC input, now upcasing it
Diffstat (limited to 'cobbler/utils.py')
-rw-r--r--cobbler/utils.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cobbler/utils.py b/cobbler/utils.py
index 0b96002..88c6c03 100644
--- a/cobbler/utils.py
+++ b/cobbler/utils.py
@@ -37,7 +37,7 @@ def find_system_identifier(strdata):
pxelinux doesn't work in hostnames
"""
if is_mac(strdata):
- return strdata
+ return strdata.upper()
if is_ip(strdata):
return strdata
return resolve_ip(strdata)
@@ -59,7 +59,7 @@ def is_mac(strdata):
Return whether the argument is a mac address.
"""
# needs testcase
- if re.search(r'[A-F0-9]{2}:[A-F0-9]{2}:[A-F0-9]{2}:[A-F0-9]{2}:[A-F:0-9]{2}:[A-F:0-9]{2}',strdata):
+ if re.search(r'[A-F0-9]{2}:[A-F0-9]{2}:[A-F0-9]{2}:[A-F0-9]{2}:[A-F:0-9]{2}:[A-F:0-9]{2}',strdata, re.IGNORECASE):
return True
return False