def port(self): """abstracts the port of the dialog""" try: return int(self.url.partition(':')[2]) except ValueError: return Options.defaultPort()