Skip to content

Fix for non-existing self_update args

In case argv[0] is not 'cerbero-uninstalled', the self_update arg is never added. This fix allow us to run cerbero in profilers such as scalene without the error:

python -m scalene ./cerbero-uninstalled show-config
Scalene: An exception of type AttributeError occurred. Arguments:
("'Namespace' object has no attribute 'self_update'",)
Traceback (most recent call last):
  File "/home/pablo/.local/lib/python3.6/site-packages/scalene/scalene.py", line 454, in main
    exec(code, the_globals)
  File "./cerbero-uninstalled", line 100, in <module>
    main()
  File "/home/pablo/Fluendo/fluendo-cerbero/cerbero/cerbero/main.py", line 189, in main
    Main(sys.argv[1:])
  File "/home/pablo/Fluendo/fluendo-cerbero/cerbero/cerbero/main.py", line 55, in __init__
    self.self_update()
  File "/home/pablo/Fluendo/fluendo-cerbero/cerbero/cerbero/main.py", line 122, in self_update
    if not self.args.self_update:
AttributeError: 'Namespace' object has no attribute 'self_update'

Merge request reports