FileNotFoundError is only available from python3.
Change it to matching class in python2.
Change-Id: I63676ef8ff6a5461a7af6e9177d6bc76e39c0bc5
Signed-off-by: Lei Feng <flei@whamcloud.com>
Test-Parameters: trivial testlist=sanity-pcc env=ONLY=200-202,ONLY_REPEAT=50 \
clientextra_install_params="--packages lipe-lpcc"
Reviewed-on: https://review.whamcloud.com/45304
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Minh Diep <mdiep@whamcloud.com>
eprint("Config file '%s' is empty, the service won't do any real work!" % \
config_file)
self.config_obj = []
- except FileNotFoundError:
+ except IOError:
# if config file does not exist, it's the same as an empty config file
eprint("Config file '%s' does not exist, the service won't do any real work!" % \
config_file)
try:
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(LISTEN_SOCK_FN)
- except FileNotFoundError:
+ except socket.error:
eprint("Socket file '%s' does not exist, " % LISTEN_SOCK_FN + \
"please check whether the monitor service started!")
sys.exit(1)