Skip to content

Rejected commands not working due to wrong plugin or wrong plugin attribute being used #2339

@malomehi

Description

@malomehi

Expected behaviour:

Commands to list and clear rejected entries work as intended

Actual behaviour:

These commands crash because module flexget.components.rejected.remember_rejected has no attribute RememberEntry

Steps to reproduce:

  • Step 1: run any of list|clear rejected sub-commands:
    flexget rejected list or flexget rejected clear

Config:

This bug does not seem to be related to user config

Log:

(click to expand)
$ flexget rejected list
Traceback (most recent call last):
  File "/usr/local/bin/flexget", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/flexget/__init__.py", line 42, in main
    manager.start()
  File "/usr/local/lib/python3.5/dist-packages/flexget/manager.py", line 364, in start
    self.handle_cli()
  File "/usr/local/lib/python3.5/dist-packages/flexget/manager.py", line 393, in handle_cli
    options.cli_command_callback(self, command_options)
  File "/usr/local/lib/python3.5/dist-packages/flexget/components/rejected/cli.py", line 20, in do_cli
    list_rejected(options)
  File "/usr/local/lib/python3.5/dist-packages/flexget/components/rejected/cli.py", line 27, in list_rejected
    results = session.query(plugin_remember_rejected.RememberEntry).all()
AttributeError: module 'flexget.components.rejected.remember_rejected' has no attribute 'RememberEntry'

Additional information:

  • FlexGet version: 2.20.1
  • Python version: 3.5.2
  • Installation method: pip3
  • Using daemon (yes/no): yes
  • OS and version: Ubuntu 16.04.5 LTS
  • Link to crash log:

In my opinion this could be fixed by making the following changes in flexget/components/rejected/cli.py:

  • Replace from flexget.components.rejected import remember_rejected as plugin_remember_rejected with from flexget.components.rejected import db
  • Replace every plugin_remember_rejected.RememberEntry with db.RememberEntry

But I would like to confirm with developers before submitting a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions