Fixed regexp for MAC address in qvm-prefs

This commit is contained in:
unman 2016-11-25 01:02:32 +00:00
parent 01b67a0af1
commit 4f2318fcc3
No known key found for this signature in database
GPG Key ID: FDD1B8244731B36C

View File

@ -196,7 +196,7 @@ def set_mac(vms, vm, args):
print >> sys.stderr, "Missing MAC argument!"
return False
if not re.match("[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}|auto", args[0]):
if not re.match("[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$|auto$", args[0]):
print >> sys.stderr, "Invalid MAC argument!"
print >> sys.stderr, "Possible values:"
print >> sys.stderr, "1) auto"