Browse Source

Fix pylint errors

Change-Id: I3cbb839a75ec3be91c74d968f528901f82e10129
Edward Hope-Morley 2 years ago
parent
commit
b483fa2668
2 changed files with 5 additions and 1 deletions
  1. 1
    1
      ceph/__init__.py
  2. 4
    0
      ceph/ceph_broker.py

+ 1
- 1
ceph/__init__.py View File

@@ -1338,7 +1338,7 @@ def osdize_dir(path, encrypt=False):
1338 1338
     if cmp_pkgrevno('ceph', "0.56.6") < 0:
1339 1339
         log('Unable to use directories for OSDs with ceph < 0.56.6',
1340 1340
             level=ERROR)
1341
-        raise
1341
+        return
1342 1342
 
1343 1343
     mkdir(path, owner=ceph_user(), group=ceph_user(), perms=0o755)
1344 1344
     chownr('/var/lib/ceph', ceph_user(), ceph_user())

+ 4
- 0
ceph/ceph_broker.py View File

@@ -168,6 +168,8 @@ def handle_add_permissions_to_key(request, service):
168 168
     A group can optionally have a namespace defined that will be used to
169 169
     further restrict pool access.
170 170
     """
171
+    resp = {'exit-code': 0}
172
+
171 173
     service_name = request.get('name')
172 174
     group_name = request.get('group')
173 175
     group_namespace = request.get('group-namespace')
@@ -190,6 +192,8 @@ def handle_add_permissions_to_key(request, service):
190 192
                                                   group_namespace)
191 193
     update_service_permissions(service_name, service_obj, group_namespace)
192 194
 
195
+    return resp
196
+
193 197
 
194 198
 def update_service_permissions(service, service_obj=None, namespace=None):
195 199
     """Update the key permissions for the named client in Ceph"""

Loading…
Cancel
Save