diff --git a/squinnondation/squinnondation.py b/squinnondation/squinnondation.py index 15b3300..32b82d1 100644 --- a/squinnondation/squinnondation.py +++ b/squinnondation/squinnondation.py @@ -39,7 +39,7 @@ class Squinnondation: help="Don't replace emojis.") self.args = parser.parse_args() - if not (1024 <= self.args.bind_port <= 65535) and (1024 <= self.args.client_port <= 65535): + if not (1024 <= self.args.bind_port <= 65535) or not (1024 <= self.args.client_port <= 65535): raise ValueError("Ports must be between 1024 and 65535.") self.bind_address = self.args.bind_address diff --git a/squinnondation/test/squinnondation_test.py b/squinnondation/test/squinnondation_test.py index 0e88607..410e015 100644 --- a/squinnondation/test/squinnondation_test.py +++ b/squinnondation/test/squinnondation_test.py @@ -26,5 +26,5 @@ class TestSquinnondation(unittest.TestCase): squinnondation.parse_arguments() self.assertEqual(squinnondation.bind_address, "localhost") self.assertEqual(squinnondation.bind_port, 4242) - self.assertEqual(squinnondation.client_address, "localhost") - self.assertEqual(squinnondation.client_port, 2500) + self.assertEqual(squinnondation.args.client_address, "localhost") + self.assertEqual(squinnondation.args.client_port, 2500)