mirror of
https://github.com/ceph/ceph
synced 2025-01-10 21:20:46 +00:00
qa/cephadm: FileNotFoundError doesn't exist in py2
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
This commit is contained in:
parent
1521908830
commit
eddb6354e1
@ -4,6 +4,7 @@ Ceph cluster task, deployed via cephadm orchestrator
|
||||
import argparse
|
||||
import configobj
|
||||
import contextlib
|
||||
import errno
|
||||
import logging
|
||||
import os
|
||||
import json
|
||||
@ -1186,6 +1187,9 @@ def add_mirror_to_cluster(ctx, mirror):
|
||||
path=registries_conf,
|
||||
data=new_config,
|
||||
)
|
||||
except FileNotFoundError as e:
|
||||
except IOError as e: # py3: use FileNotFoundError instead.
|
||||
if e.errno != errno.ENOENT:
|
||||
raise
|
||||
|
||||
# Docker doesn't ship a registries.conf
|
||||
log.info('Failed to add mirror: %s' % str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user