From: Michael Fritch Date: Tue, 4 May 2021 18:35:47 +0000 (-0600) Subject: cephadm: apply autopep8 changes X-Git-Tag: v16.2.5~115^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=76926512f2b496932e46534329c14a4499fe7dc4;p=ceph.git cephadm: apply autopep8 changes Signed-off-by: Michael Fritch (cherry picked from commit 6eaf23231d6048e6e583eff850395666b370c631) --- diff --git a/src/cephadm/cephadm b/src/cephadm/cephadm index 139db69d205..5a5a9697750 100755 --- a/src/cephadm/cephadm +++ b/src/cephadm/cephadm @@ -2706,7 +2706,7 @@ def deploy_daemon_units( # cmd data_dir = get_data_dir(fsid, ctx.data_dir, daemon_type, daemon_id) with open(data_dir + '/unit.run.new', 'w') as f, \ - open(data_dir + '/unit.meta.new', 'w') as metaf: + open(data_dir + '/unit.meta.new', 'w') as metaf: f.write('set -e\n') if daemon_type in Ceph.daemons: @@ -6853,12 +6853,14 @@ class CephadmDaemonHandler(BaseHTTPRequestHandler): The token is installed at deployment time and must be provided to ensure we only respond to callers who know our token i.e. mgr """ + def wrapper(self, *args, **kwargs): auth = self.headers.get('Authorization', None) if auth != 'Bearer ' + self.server.token: self.send_error(401) return f(self, *args, **kwargs) + return wrapper def _help_page(self):