Skip to content

Unexpected crash when master returns error regarding no writable volumes #8

@KennethThompson

Description

@KennethThompson

Line 179 of the seaweed.py file is:
data = json.loads(self.conn.get_data(url))

However, if the master is in a state where no writable volumes are available, this results in the self.conn.get_data(url) returning None rather than your expected string.

When I manually run the request using Curl/Chrome, I get this out: {"error":"No free volumes left for {"replication":{},"ttl":{"Count":0,"Unit":0}}"}.

However, the python script sees the return as None for some reason.

In any event, this appears to be a bug. Line 179 should be able to handle a return of None gracefully.

I also note that the documentation indicates the setup.py file can be used to execute tests from the local git project. However, I am getting a 'tests' command undefined when I execute the command per the documentation. Not exactly sure how I can get the local tests to run- which would be handy to submit a pull request. Forgive my inexperience.

Thanks for putting this library together

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions