Explorar el Código

Fix ranges with size 0.

tags/v0.3
Ben Kurtovic hace 8 años
padre
commit
66ef969f82
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      earwigbot/commands/cidr.py

+ 1
- 1
earwigbot/commands/cidr.py Ver fichero

@@ -129,7 +129,7 @@ class CIDR(Command):
bin_ips = ["".join(
bin(ord(octet))[2:].zfill(8) for octet in ip.ip) for ip in ips]
for i, ip in enumerate(ips):
if ip.size:
if ip.size is not None:
suffix = "X" * (len(bin_ips[i]) - ip.size)
bin_ips[i] = bin_ips[i][:ip.size] + suffix



Cargando…
Cancelar
Guardar