File: source_totem.py

package info (click to toggle)
totem 43.2-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,496 kB
  • sloc: ansic: 30,058; python: 964; makefile: 228; xml: 221; sh: 157
file content (18 lines) | stat: -rw-r--r-- 820 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os, apport.packaging, apport.hookutils

def add_info(report, ui):

    report["LogAlsaMixer"] = apport.hookutils.command_output(["/usr/bin/amixer"])
    report["GstreamerVersions"] = apport.hookutils.package_versions("gstreamer*")
    report["XorgLog"] = apport.hookutils.read_file("/var/log/Xorg.0.log")

    response = ui.choice("How would you describe the issue?", ["The totem interface is not working correctly", "No sound is being played", "Some audio files or videos are not being played correctly"], False)

    if response == None: # user cancelled
        raise StopIteration
    if response[0] == 1: # the issue is a sound one
        os.execlp('apport-bug', 'apport-bug', 'audio')

    if response[0] == 2: # the issue is a codec one
        report.add_package_info("libgstreamer1.0-0")
        return