File: source_rednotebook.py

package info (click to toggle)
rednotebook 2.41%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,980 kB
  • sloc: python: 9,818; javascript: 4,103; xml: 128; sh: 58; makefile: 12
file content (22 lines) | stat: -rw-r--r-- 536 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""apport package hook for rednotebook.

Code adapted from the novacut project.

(c) 2012 Novacut Inc
Author: Jason Gerard DeRose <jderose@novacut.com>
"""

import os
from os import path

from apport.hookutils import attach_file_if_exists

LOGS = (("DebugLog", "rednotebook.log"),)


def add_info(report):
    report["CrashDB"] = "rednotebook"
    rednotebook_dir = path.join(os.environ["HOME"], ".rednotebook")
    for (key, name) in LOGS:
        log = path.join(rednotebook_dir, name)
        attach_file_if_exists(report, log, key)