Skip to content

asn expert database update fails if file does not already exist #2689

@sebix

Description

@sebix
$ intelmq.bots.experts.asn_lookup.expert --update-database
Traceback (most recent call last):
  File "/usr/bin/intelmq.bots.experts.asn_lookup.expert", line 33, in <module>
    sys.exit(load_entry_point('intelmq==3.5.0', 'console_scripts', 'intelmq.bots.experts.asn_lookup.expert')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/intelmq/bots/experts/asn_lookup/expert.py", line 92, in run
    cls.update_database(verbose=parsed_args.verbose)
  File "/usr/lib/python3/dist-packages/intelmq/bots/experts/asn_lookup/expert.py", line 127, in update_database
    raise ValueError('Database file does not exist or is not a file.')
ValueError: Database file does not exist or is not a file.

The file needs to be created with whatever content before it works

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: botsgood first issueIndicates a good issue for first-time contributorshelp wantedIndicates that a maintainer wants help on an issue or pull request

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions