[Bro-Dev] [JIRA] (BIT-233) Python error when running `broctl cron`
Jon Siwek (JIRA)
jira at bro-tracker.atlassian.net
Thu Mar 19 14:35:00 PDT 2015
[ https://bro-tracker.atlassian.net/browse/BIT-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jon Siwek updated BIT-233:
--------------------------
Component/s: (was: Bro)
BroControl
> Python error when running `broctl cron`
> ---------------------------------------
>
> Key: BIT-233
> URL: https://bro-tracker.atlassian.net/browse/BIT-233
> Project: Bro Issue Tracker
> Issue Type: Problem
> Components: BroControl
> Affects Versions: 1.5.1
> Reporter: jones
>
> I have a fresh installation of Bro 1.5.1, and I am encountering an error when running 'broctl cron'. It appears that when broctl attempts to do a df, the % symbol is not stripped before python tries to convert it to a float. This throws a python error, as you can see below.
> I made the error disappear by changing {{avail=float(df[3])}} to {{avail=float(df[3].strip("%"))}}
> Thanks,
> Nick Jones
> {noformat}
> # broctl cron
> warning: removing stale lock
> Traceback (most recent call last):
> File "/usr/local/bro/bin/broctl", line 726, in ?
> loop.onecmd(line)
> File "/usr/lib64/python2.4/cmd.py", line 219, in onecmd
> return func(arg)
> File "/usr/local/bro/bin/broctl", line 341, in do_cron
> cron.doCron()
> File "/usr/local/bro/lib/broctl/BroControl/cron.py", line 41, in doCron
> _checkDiskSpace()
> File "/usr/local/bro/lib/broctl/BroControl/cron.py", line 150, in _checkDiskSpace
> avail = float(df[3])
> ValueError: invalid literal for float(): 2%
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4-OD-15-055#64014)
More information about the bro-dev
mailing list