diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-27 15:48:06 +0100 |
|---|---|---|
| committer | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2023-02-27 15:48:06 +0100 |
| commit | 61cfede116939073626377f46f19aaed6556470f (patch) | |
| tree | 8fa5c363b1e21d61f5845f804e6527b39d77c71c /exports | |
| parent | 6f8e016fcff9c1c47474b6c0b6c3c09d37d64e1a (diff) | |
Exports Disco + Python: Make sure we can always obtain the local cache
Diffstat (limited to 'exports')
| -rw-r--r-- | exports/disco.go | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/exports/disco.go b/exports/disco.go index e18df3d..5fd027c 100644 --- a/exports/disco.go +++ b/exports/disco.go @@ -176,10 +176,6 @@ func GetDiscoServers(name *C.char) (*C.discoveryServers, *C.error) { return nil, getError(stateErr) } servers, serversErr := state.DiscoServers() - if serversErr != nil { - return nil, getError(serversErr) - } - returnedStruct := (*C.discoveryServers)( C.malloc(C.size_t(unsafe.Sizeof(C.discoveryServers{}))), ) @@ -188,7 +184,7 @@ func GetDiscoServers(name *C.char) (*C.discoveryServers, *C.error) { state, servers, ) - return returnedStruct, nil + return returnedStruct, getError(serversErr) } //export GetDiscoOrganizations @@ -199,10 +195,6 @@ func GetDiscoOrganizations(name *C.char) (*C.discoveryOrganizations, *C.error) { return nil, getError(stateErr) } organizations, organizationsErr := state.DiscoOrganizations() - if organizationsErr != nil { - return nil, getError(organizationsErr) - } - returnedStruct := (*C.discoveryOrganizations)( C.malloc(C.size_t(unsafe.Sizeof(C.discoveryOrganizations{}))), ) @@ -213,5 +205,5 @@ func GetDiscoOrganizations(name *C.char) (*C.discoveryOrganizations, *C.error) { organizations, ) - return returnedStruct, nil + return returnedStruct, getError(organizationsErr) } |
