Skip to content

Enhancement: Context#prefix should be a property #13

@ansman

Description

@ansman

Currently the prefix is an attribute in Context but this causes some problems.

In our framework you can change the ports Splunk listens to which causes our framework to update the ports of the Service

However, writing to port does not update the prefix variable so it won't be reflected when making requests.

I suggest the following code:

class Context:
....
@property
def prefix(self):
    return "%s://%s:%s" % (self.scheme, self.host, self.port)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions