~allenap/maas/packaging.fix-patch-02

« back to all changes in this revision

Viewing changes to debian/maas-region-controller-min.apport

  • Committer: MaaS Lander
  • Author(s): Gavin Panella
  • Date: 2015-01-14 23:04:19 UTC
  • mfrom: (330.3.20 packaging.regiond)
  • Revision ID: maas_lander-20150114230419-qc7b6n4uipl6jc71
[r=andreserl][bug=1350786][author=allenap] Packaging for maas-regiond.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
'''apport hook for maas-region-controller
4
4
 
5
 
(c) 2012 Canonical Ltd.
 
5
(c) 2012-2014 Canonical Ltd.
6
6
Author: Andres Rodriguez <andres.rodriguez@canonical.com>
7
7
 
8
8
This program is free software; you can redistribute it and/or modify it
12
12
the full text of the license.
13
13
'''
14
14
 
15
 
from apport.hookutils import *
 
15
from apport.hookutils import (
 
16
    attach_conffiles,
 
17
    attach_file_if_exists,
 
18
    attach_related_packages,
 
19
)
 
20
 
16
21
 
17
22
def add_info(report, ui):
18
 
    response = ui.yesno("The contents of your /etc/maas/maas_local_settings.py, "
19
 
                        "/etc/maas/pserv.yaml files "
20
 
                        "may help developers diagnose your bug more "
21
 
                        "quickly.  However, it may contain sensitive "
22
 
                        "information.  Do you want to include it in your "
23
 
                        "bug report?")
 
23
    response = ui.yesno(
 
24
        "The contents of your /etc/maas/maas_local_settings.py, "
 
25
        "/etc/maas/pserv.yaml files may help developers diagnose your bug "
 
26
        "more quickly.  However, it may contain sensitive information.  Do "
 
27
        "you want to include it in your bug report?")
24
28
 
25
 
    if response == None: # user cancelled
 
29
    if response is None:  # user cancelled
26
30
        raise StopIteration
27
 
 
28
 
    elif response == True:
29
 
        attach_conffiles(report,'maas')
 
31
    elif response is True:
 
32
        attach_conffiles(report, 'maas')
30
33
 
31
34
    # Attaching log files
32
 
    attach_file_if_exists(report, '/var/log/maas/maas-django.log', 'MAASLog')
33
 
    attach_file_if_exists(report, '/var/log/maas/pserv.log', 'MAASPservLog')
 
35
    attach_file_if_exists(report, '/var/log/maas/regiond.log', 'MAASRegionLog')
 
36
    attach_file_if_exists(report, '/var/log/maas/pserv.log', 'MAASClusterLog')
34
37
 
35
38
    # Attaching related packages info
36
39
    attach_related_packages(report, ['python-django-maas', 'apparmor'])