Skip to content

Commit

Permalink
system: catch OSError instead of Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr. Outis committed Jan 10, 2020
1 parent e5bee24 commit 6eac40d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions dvc/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@ def copy(src, dest):
def hardlink(source, link_name):
try:
os.link(source, link_name)
return
except Exception as exc:
except OSError as exc:
raise DvcException("failed to link") from exc

@staticmethod
def symlink(source, link_name):
try:
os.symlink(source, link_name)
return
except Exception as exc:
except OSError as exc:
raise DvcException("failed to symlink") from exc

@staticmethod
Expand Down

0 comments on commit 6eac40d

Please sign in to comment.