Univention Bugzilla – Attachment 6620 Details for
Bug 33256
Changing empty DNS TTL on Host record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Newest version of patch
33256 (text/plain), 1.48 KB, created by
Drees Dormann
on 2015-01-21 16:57 CET
(
hide
)
Description:
Newest version of patch
Filename:
MIME Type:
Creator:
Drees Dormann
Created:
2015-01-21 16:57 CET
Size:
1.48 KB
patch
obsolete
>Index: modules/univention/admin/mapping.py >=================================================================== >--- modules/univention/admin/mapping.py (Revision 57408) >+++ modules/univention/admin/mapping.py (Arbeitskopie) >@@ -73,11 +81,17 @@ > if list != 'None': > return list > >-def unmapUNIX_TimeInterval( value ): >+def _stringToInt(value): >+ try: >+ return int(value) >+ except (ValueError, TypeError): >+ return 0 >+ >+def unmapUNIX_TimeInterval(value): > if type(value) == types.ListType: >- value = int(value[0]) >+ value = _stringToInt(value[0]) > else: >- value = int(value) >+ value = _stringToInt(value) > unit = 'seconds' > if value % 60 == 0: > value /= 60 >@@ -88,23 +102,23 @@ > if value % 24 == 0: > value /= 24 > unit = 'days' >- return [ unicode( value ), unit ] >+ return [unicode(value), unit] > >-def mapUNIX_TimeInterval( value ): >+def mapUNIX_TimeInterval(value): > unit = 'seconds' >- if isinstance( value, ( tuple, list ) ): >- if len( value ) > 1: >- unit = value[ 1 ] >- value = int( value[ 0 ] ) >+ if isinstance(value, (tuple, list)): >+ if len(value) > 1: >+ unit = value[1] >+ value = _stringToInt(value[0]) > else: >- value = int( value ) >+ value = _stringToInt(value) > if unit == 'days': > value *= 24 * 60 * 60 > elif unit == 'hours': > value *= 60 * 60 > elif unit == 'minutes': > value *= 60 >- return unicode( value ) >+ return unicode(value) > > def unmapBase64( value ): > '''mapBase64 converts binary data (as found in LDAP) to Base64 encoded UDM propertry values'''
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 33256
:
6608
|
6609
| 6620