'Convert a D-BUS return variant into an appropriate return value'

@classmethod
def _unpack_result(klass, result):

    result = result.unpack()
    if (len(result) == 1):
        result = result[0]
    elif (len(result) == 0):
        result = None
    return result
