Re: [devel] [PATCH 1/1] pyosaf: Raise ValueError instead NoneType Exception [#1410]

2017-10-16 Thread Quyen Dao

Hi Hieu,

Ack from me.

Thanks,
Quyen

On 10/17/2017 10:01 AM, Hieu Nguyen wrote:

---
  python/pyosaf/utils/immom/object.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyosaf/utils/immom/object.py 
b/python/pyosaf/utils/immom/object.py
index c2924d3..7d8ece8 100644
--- a/python/pyosaf/utils/immom/object.py
+++ b/python/pyosaf/utils/immom/object.py
@@ -59,7 +59,7 @@ class ImmObject(object):
  self.class_desc[class_name] = \
  pyosaf.utils.immom.class_description_get(class_name)
  else:
-raise
+raise ValueError("Class and attributes are None")
  
  self.__dict__["rdn_attribute"] = \

  pyosaf.utils.immom.get_rdn_attribute_for_class(class_name)


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel


[devel] [PATCH 1/1] pyosaf: Raise ValueError instead NoneType Exception [#1410]

2017-10-16 Thread Hieu Nguyen
---
 python/pyosaf/utils/immom/object.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/python/pyosaf/utils/immom/object.py 
b/python/pyosaf/utils/immom/object.py
index c2924d3..7d8ece8 100644
--- a/python/pyosaf/utils/immom/object.py
+++ b/python/pyosaf/utils/immom/object.py
@@ -59,7 +59,7 @@ class ImmObject(object):
 self.class_desc[class_name] = \
 pyosaf.utils.immom.class_description_get(class_name)
 else:
-raise
+raise ValueError("Class and attributes are None")
 
 self.__dict__["rdn_attribute"] = \
 pyosaf.utils.immom.get_rdn_attribute_for_class(class_name)
-- 
2.7.4


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Opensaf-devel mailing list
Opensaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-devel