Skip to content

Commit

Permalink
Merge pull request #37 from jbd/patch-1
Browse files Browse the repository at this point in the history
Check that mount call is OK
  • Loading branch information
sahlberg authored Nov 13, 2023
2 parents f245df1 + e1e50bb commit f99fa9d
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 @@ -178,7 +178,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 f99fa9d

Please sign in to comment.