Skip to content

Commit

Permalink
Check that mount call is OK
Browse files Browse the repository at this point in the history
This should prevent the behavior seen in sahlberg#36.
  • Loading branch information
jbd authored Aug 1, 2020
1 parent 2078e9b commit e1e50bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libnfs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ class NFS(object):
def __init__(self, url):
self._nfs = nfs_init_context()
self._url = nfs_parse_url_dir(self._nfs, url)
nfs_mount(self._nfs, self._url.server, self._url.path)
ret = nfs_mount(self._nfs, self._url.server, self._url.path)
if ret != 0:
raise IOError(nfs_get_error(self._nfs))

def __del__(self):
nfs_destroy_url(self._url)
Expand Down

0 comments on commit e1e50bb

Please sign in to comment.