Created
March 6, 2019 21:58
-
-
Save juanarrivillaga/2fa06e2bca68662ef7d39e341807b337 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Server(object): | |
def __init__(self, ip_address, username, password, port): | |
self.ip_address = ip_address | |
self.username = username | |
self.password = password | |
self.port = port | |
self.update_base_url(ip_address, port) | |
def update_base_url(self, ip_address, port): | |
base_url = 'https://' + str(ip_address) + ':' + str(port) + '/' | |
self.base_url = base_url | |
def __delattr__(self, attr): | |
raise AttributeError(f"Dont delete {attr}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment