Browse Source

Merge "Clean up bare raised pylint warning"

tags/14.0.0.0rc1
Zuul 10 months ago
parent
commit
0fdbc4780d

+ 0
- 1
.pylintrc View File

@@ -80,7 +80,6 @@ disable=
80 80
  keyword-arg-before-vararg,
81 81
  too-many-function-args,
82 82
  unsupported-assignment-operation,
83
- misplaced-bare-raise,
84 83
  not-an-iterable,
85 84
  unsupported-membership-test,
86 85
  unsupported-assignment-operation,

+ 1
- 1
cinder/volume/drivers/huawei/rest_client.py View File

@@ -2374,7 +2374,7 @@ class RestClient(object):
2374 2374
         result = self.call(url, None, "GET", log_filter_flag=True)
2375 2375
 
2376 2376
         if result['error']['code'] != 0:
2377
-            raise
2377
+            raise Exception(_('Failed to get object count.'))
2378 2378
 
2379 2379
         if result.get("data"):
2380 2380
             return result.get("data").get("COUNT")

+ 1
- 1
cinder/volume/drivers/netapp/dataontap/client/api.py View File

@@ -348,7 +348,7 @@ class NaElement(object):
348 348
         if isinstance(na_element, NaElement):
349 349
             self._element.append(na_element._element)
350 350
             return
351
-        raise
351
+        raise Exception(_('Failed to add child element.'))
352 352
 
353 353
     def get_child_by_name(self, name):
354 354
         """Get the child element by the tag name."""

Loading…
Cancel
Save