Skip to content

access to other servers than Tranquility and Serenity fails #34

Description

@IngHarm

if you try to access other installations with
eve = blue.EVE(EVEPATH,SERVER)
where SERVER = "Singularity" or SERVER is set to an other IP or Name than Tranquility or Serenity, you will get an
UnboundLocalError: local variable 'servername' referenced before assignment

This error occurs because the servername in the _getserver(server) in blue.py is not set.
I fixed this in the following code for Singularity:

def _getserver(server):
    if server.replace(".","").isdigit():
        serverip = server or None
    else:
        serverip = _serveraliases.get(server.lower(), None)

    if serverip is None:
        raise ValueError("Invalid server name '%s'. Valid names are '%s' or an IP address." %\
            (server, "', '".join((x.capitalize() for x in _serveraliases))))

    if serverip == "87.237.38.200":
        servername = "Tranquility"
    elif serverip == "211.144.214.68":
        servername = "211.144.214.68"
# Fix for Singularity
    elif serverip == "87.237.38.50":
        servername = "Singularity"
# Fix for all others
    else: 
       servername = serverip

    return servername, serverip

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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