Univention Bugzilla – Attachment 4073 Details for
Bug 25463
Weitere MAC-Adressenformate unterstützen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
add support for common mac address formats
regex_patch.diff (text/plain), 979 bytes, created by
Lukas Walter
on 2012-01-06 13:23:24 CET
(
hide
)
Description:
add support for common mac address formats
Filename:
MIME Type:
Creator:
Lukas Walter
Created:
2012-01-06 13:23:24 CET
Size:
979 bytes
patch
obsolete
>Index: modules/univention/admin/syntax.py >=================================================================== >--- modules/univention/admin/syntax.py (Revision 30173) >+++ modules/univention/admin/syntax.py (Arbeitskopie) >@@ -1081,8 +1081,14 @@ > choices = ( ( 'ethernet', _( 'Ethernet' ) ), ( 'fddi', _( 'FDDI' ) ), ( 'token-ring', _( 'Token-Ring' ) ) ) > > class MAC_Address( simple ): >- regex = re.compile( '^([0-9a-fA-F]{1,2}[:-]){5}[0-9a-fA-F]{1,2}$' ) >- error_message = _( 'This is not a valid MAC address. It must have 6 two digit hexadecimal numbers separated by \"-\" or \":\"' ) >+ regexFormats = ( >+ '(([0-9a-fA-F]{2}:){5}[0-9a-fA-F]{2})', # linux format >+ '(([0-9a-fA-F]{2}-){5}[0-9a-fA-F]{2})', # windows format >+ '([0-9a-fA-F]{12})', # raw format >+ '(([0-9a-fA-F]{4}.){2}[0-9a-fA-F]{4})', # cisco format >+ ) >+ regex = re.compile( '^(' + '|'.join(regexFormats) + ')$' ) >+ error_message = _( 'This is not a valid MAC address.' ) > size = 'TwoThirds' > > @classmethod
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25463
:
4073
|
4074
|
4075
|
4088
|
4089
|
4092
|
4094