瀏覽代碼

Fix ranges with size 0.

tags/v0.3
Ben Kurtovic 9 年之前
父節點
當前提交
66ef969f82
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      earwigbot/commands/cidr.py

+ 1
- 1
earwigbot/commands/cidr.py 查看文件

@@ -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



Loading…
取消
儲存