Exemplo n.º 1
0
 def outward_server_port(self):
     if self.is_outward_server():
         port = self._get("outward.server.port")
         if port and iputil.validate_port(port):
             return port
         else:
             raise self.config_error("Wrong outward.server.port value. It should be a single number from the 1..65535 range")
     else:
         self.config_error("outward.server.port read while outward.server not enabled")
Exemplo n.º 2
0
 def local_server_port(self):
     if self.is_local_server():
         try:
             port = self._get("local.server.port")
             if port and iputil.validate_port(port):
                 return port
             else:
                 raise self.config_error("Wrong local.server.port value. It should be a single number from the 1..65535 range")
         except NoOptionError, e:
             raise self.config_error(str(e))
 def outward_server_port(self):
     if self.is_outward_server():
         port = self._get("outward.server.port")
         if port and iputil.validate_port(port):
             return port
         else:
             raise self.config_error(
                 "Wrong outward.server.port value. It should be a single number from the 1..65535 range"
             )
     else:
         self.config_error(
             "outward.server.port read while outward.server not enabled")
 def local_server_port(self):
     if self.is_local_server():
         try:
             port = self._get("local.server.port")
             if port and iputil.validate_port(port):
                 return port
             else:
                 raise self.config_error(
                     "Wrong local.server.port value. It should be a single number from the 1..65535 range"
                 )
         except NoOptionError, e:
             raise self.config_error(str(e))