X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FN2VC.git;a=blobdiff_plain;f=juju%2Fclient%2Ffacade.py;h=a7083e694e21f625f6f55f409ddf07d44b62303a;hp=817b37b12a829dafa0d9109297b8d306652d361e;hb=ac5b9fc0eaf87c5126949307352d1d56781ef3ef;hpb=a9180cca8165ab6396971a30e3063845a428dd5e diff --git a/juju/client/facade.py b/juju/client/facade.py index 817b37b..a7083e6 100644 --- a/juju/client/facade.py +++ b/juju/client/facade.py @@ -264,6 +264,8 @@ def retspec(defs): # Error or the expected Type if not defs: return None + if defs in basic_types: + return strcast(defs, False) rtypes = _registry.getObj(_types[defs]) if not rtypes: return None @@ -402,7 +404,10 @@ def _buildMethod(cls, name): params = _types.get(spec['$ref']) spec = prop.get('Result') if spec: - result = _types.get(spec['$ref']) + if '$ref' in spec: + result = _types.get(spec['$ref']) + else: + result = SCHEMA_TO_PYTHON[spec['type']] return makeFunc(cls, name, params, result) @@ -620,6 +625,5 @@ def main(): print(capture, file=fp) - if __name__ == '__main__': main()