At Mon, 21 Sep 2015 21:25:29 +0900 (JST),
FUJITA Tomonori wrote:
> 
> >From 448ebe99e9dc42f62bc1cc9b2e49228c9a2b6a61 Mon Sep 17 00:00:00 2001
> From: FUJITA Tomonori <[email protected]>
> Date: Mon, 21 Sep 2015 21:18:40 +0900
> Subject: [PATCH] bgp: python3 fixes
> 
> Signed-off-by: FUJITA Tomonori <[email protected]>
> ---
>  ryu/services/protocols/bgp/base.py             | 2 +-
>  ryu/services/protocols/bgp/rtconf/base.py      | 9 +++------
>  ryu/services/protocols/bgp/utils/circlist.py   | 2 ++
>  ryu/services/protocols/bgp/utils/internable.py | 1 +
>  4 files changed, 7 insertions(+), 7 deletions(-)

> diff --git a/ryu/services/protocols/bgp/rtconf/base.py 
> b/ryu/services/protocols/bgp/rtconf/base.py
> index 5925e6e..eb19543 100644
> --- a/ryu/services/protocols/bgp/rtconf/base.py
> +++ b/ryu/services/protocols/bgp/rtconf/base.py
> @@ -21,9 +21,6 @@ from abc import abstractmethod
>  import numbers
>  import logging
>  import uuid
> -from types import BooleanType
> -from types import IntType
> -from types import LongType
>  
>  from ryu.services.protocols.bgp.base import add_bgp_error_metadata
>  from ryu.services.protocols.bgp.base import BGPSException
> @@ -645,7 +642,7 @@ def validate_cap_rtc_as(rtc_as):
>  
>  @validate(name=HOLD_TIME)
>  def validate_hold_time(hold_time):
> -    if ((hold_time is None) or (not isinstance(hold_time, IntType)) or
> +    if ((hold_time is None) or (not isinstance(hold_time, int)) or
>              hold_time < 10):
>          raise ConfigValueError(desc='Invalid hold_time configuration value 
> %s'
>                                 % hold_time)
> @@ -681,7 +678,7 @@ def validate_soo_list(soo_list):
>  
>  @validate(name=MAX_PREFIXES)
>  def validate_max_prefixes(max_prefixes):
> -    if not isinstance(max_prefixes, (IntType, LongType)):
> +    if not isinstance(max_prefixes, (IntType, long)):

Sorry to be late, but this IntType also needs to be fixed?

>          raise ConfigTypeError(desc='Max. prefixes value should be of type '
>                                'int or long but found %s' % 
> type(max_prefixes))
>      if max_prefixes < 0:
> @@ -692,7 +689,7 @@ def validate_max_prefixes(max_prefixes):
>  
>  @validate(name=ADVERTISE_PEER_AS)
>  def validate_advertise_peer_as(advertise_peer_as):
> -    if not isinstance(advertise_peer_as, BooleanType):
> +    if not isinstance(advertise_peer_as, bool):
>          raise ConfigTypeError(desc='Invalid type for advertise-peer-as, '
>                                'expected bool got %s' %
>                                type(advertise_peer_as))

------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to