Univention Bugzilla – Attachment 6608 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]
Patch for conversion handling
patch (text/plain), 943 bytes, created by
Drees Dormann
on 2015-01-19 10:00 CET
(
hide
)
Description:
Patch for conversion handling
Filename:
MIME Type:
Creator:
Drees Dormann
Created:
2015-01-19 10:00 CET
Size:
943 bytes
patch
obsolete
>Index: modules/univention/admin/mapping.py >=================================================================== >--- modules/univention/admin/mapping.py (Revision 57356) >+++ modules/univention/admin/mapping.py (Arbeitskopie) >@@ -73,11 +82,18 @@ > if list != 'None': > return list > >+def StringToInt(value): >+ try: >+ result = int(value) >+ except ValueError: >+ return 0 >+ return result >+ > 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 >@@ -95,9 +111,9 @@ > if isinstance( value, ( tuple, list ) ): > if len( value ) > 1: > unit = value[ 1 ] >- value = int( value[ 0 ] ) >+ value = StringtoInt( value[ 0 ] ) > else: >- value = int( value ) >+ value = StringToInt( value ) > if unit == 'days': > value *= 24 * 60 * 60 > elif unit == 'hours':
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