Skip to content
Snippets Groups Projects
Commit ac3e88d7 authored by Jan David Mol's avatar Jan David Mol
Browse files

SW-695: P2->3 Use specialised OSError classes to only catch specific errors

parent df53c3ec
No related branches found
No related tags found
1 merge request!4Lofar release 4 0 minor fixes
...@@ -38,10 +38,8 @@ class setupsourcedb(LOFARnodeTCP): ...@@ -38,10 +38,8 @@ class setupsourcedb(LOFARnodeTCP):
try: try:
os.makedirs(skydb_dir) os.makedirs(skydb_dir)
self.logger.debug("Created output directory %s" % skydb_dir) self.logger.debug("Created output directory %s" % skydb_dir)
except OSError as err: except FileExistsError:
# Ignore error if directory already exists, otherwise re-raise pass
if err[0] != errno.EEXIST:
raise
# **************************************************************** # ****************************************************************
# 2 Remove any old sky database # 2 Remove any old sky database
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment