tarina

git clone https://git.tarina.org/tarina
Log | Files | Refs | README | LICENSE

commit 01cf35044d9526957b657e6c89bbd22d23ffb788
parent d21172053010a437aa997987fe4e13b819f6af0f
Author: rbckman <rob@tarina.org>
Date:   Wed, 25 Oct 2023 16:35:03 +0100

fix ip selection

Diffstat:
Mtarina.py | 15+++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/tarina.py b/tarina.py @@ -2421,14 +2421,13 @@ def newcamera_ip(abc, network): ip = ip[:-1] cursor = abc[abcx] elif pressed == 'middle' or event == 10: - if len(ip) > 0: - if abc[abcx] != '_': - if int(ip) < 256: - ip = ip + abc[abcx] - logger.info("New camera " + ip_network+ip) - return (ip_network+ip).strip() - else: - helpmessage = 'in the range of ips 1-256' + if abc[abcx] != ' ': + ip = ip + abc[abcx] + if int(ip) < 256: + logger.info("New camera " + ip_network+ip) + return (ip_network+ip).strip() + else: + helpmessage = 'in the range of ips 1-256' elif pressed == 'retake': return '' elif event in abc: