Skip to content

Commit f80142f

Browse files
committed
allow empty strings for port envs
1 parent 4c86119 commit f80142f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mytoninstaller/mytoninstaller.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343

4444

4545
def init_envs(local):
46-
local.buffer.cport = int(os.getenv('VALIDATOR_CONSOLE_PORT', random.randint(2000, 65000)))
47-
local.buffer.lport = int(os.getenv('LITESERVER_PORT', random.randint(2000, 65000)))
48-
local.buffer.vport = int(os.getenv('VALIDATOR_PORT', random.randint(2000, 65000)))
46+
local.buffer.cport = int(os.getenv('VALIDATOR_CONSOLE_PORT') if os.getenv('VALIDATOR_CONSOLE_PORT') else random.randint(2000, 65000))
47+
local.buffer.lport = int(os.getenv('LITESERVER_PORT') if os.getenv('LITESERVER_PORT') else random.randint(2000, 65000))
48+
local.buffer.vport = int(os.getenv('VALIDATOR_PORT') if os.getenv('VALIDATOR_PORT') else random.randint(2000, 65000))
4949
local.buffer.archive_ttl = os.getenv('ARCHIVE_TTL')
5050
local.buffer.state_ttl = os.getenv('STATE_TTL')
5151
local.buffer.public_ip = os.getenv('PUBLIC_IP')

0 commit comments

Comments
 (0)