Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pitivi pitivi
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 193
    • Issues 193
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 27
    • Merge requests 27
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOME
  • pitivipitivi
  • Issues
  • #2425

Closed
Open
Created Feb 21, 2020 by Alexandru Băluț@alebMaintainer

Cleanup how `set_combo_value` is used

For example if you PITIVI_DEBUG=6 pitivi, new project, create title clip, render, choose preset "youtube", notice in the console:

INFO  21:33:40 utils             None set_combo_value: Could not set value <Gst.ElementFactory object at 0x7f3d8b649140 (GstElementFactory at 0x55b19be91490)>, possible values: ['JPEG image', 'On2 VP8', 'x264enc', 'Unsupported'] (pitivi/utils/ui.py:757)

This message is confusing, giving the impression that the value parameter passed to the function is of the wrong type. The v[0] should be v[1] to fix this.

The set_combo_value method returns False when it fails, but the value is often ignored and sometimes errors can remain undetected. In at least a few cases it's appropriate to check the returned value, for example:

res = set_combo_value(combo, value)
assert res, value
Edited Feb 22, 2020 by Alexandru Băluț
Assignee
Assign to
Time tracking