From d5703541be8c463bb027b99aefc92130d88b8cc8 Mon Sep 17 00:00:00 2001 From: Ganesh Chowdary Nune Date: Sat, 8 Oct 2022 23:28:31 +0530 Subject: [PATCH] Added documentation for getRandomPort fn --- src/File/FileServer.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/File/FileServer.py b/src/File/FileServer.py index 7f73017e6..b7a942fc5 100644 --- a/src/File/FileServer.py +++ b/src/File/FileServer.py @@ -72,6 +72,12 @@ def __init__(self, ip=config.fileserver_ip, port=config.fileserver_port, ip_type self.ui_server = None def getRandomPort(self, ip, port_range_from, port_range_to): + """Generates Random Port from given range + Args: + ip: IP Address + port_range_from: From Range + port_range_to: to Range + """ self.log.info("Getting random port in range %s-%s..." % (port_range_from, port_range_to)) tried = [] for bind_retry in range(100):