Commit 204114ab authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

gen_flash_image: don't check adress if no address given

parent 91dfdb8f
......@@ -30,7 +30,7 @@ GEN_EEPROM_CMD = "{path}./gensdbfs {path}sdbfs-eeprom {img}"
###########################################################
def check_mac(mac):
if not re.match("[0-9a-f]{2}([-:])[0-9a-f]{2}(\\1[0-9a-f]{2}){4}$", mac.lower()):
print "Not a valid MAC"
print "Not a valid MAC address"
return 0
return 1
......@@ -40,7 +40,7 @@ def check_mac(mac):
# type can be either "flash" or "eeprom"
def gen_sdb_image(type, mac, bstr, output=None):
if not check_mac(mac):
if mac and not check_mac(mac):
return
# Translate MAC to be always in XX-XX-XX-XX-XX-XX format
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment