~yrke/tarmac/configable-bugresolving

« back to all changes in this revision

Viewing changes to tarmac/plugins/bugresolver.py

  • Committer: Kenneth Yrke Jørgensen
  • Date: 2011-10-17 10:53:03 UTC
  • Revision ID: mail@yrke.dk-20111017105303-01pohijqiwnr4323
Changed convertion of unicode string and config load order

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        #Is the plugin enabled?
28
28
        #project setting overwrites global settings
29
29
        try:
30
 
            close_bugs = command.config.closebugs
 
30
            close_bugs = target.config.closebugs
31
31
        except AttributeError:
32
32
            try:
33
 
                close_bugs = target.config.closebugs
 
33
                close_bugs = command.config.closebugs
34
34
            except AttributeError:
35
35
                return
36
36
 
45
45
        #What status to set
46
46
        close_status = u'Fix Committed'
47
47
        try:
48
 
            close_status = command.config.closestatus
 
48
            close_status = target.config.closestatus
49
49
        except AttributeError:
50
50
            try:
51
 
                close_status = target.config.closestatus
 
51
                close_status = command.config.closestatus
52
52
            except AttributeError:
53
53
                pass
54
 
        #Convert to unicode, Is this needed? 
55
 
        close_status = close_status.decode('utf-8') 
 
54
        #Convert to unicode
 
55
        close_status = unicode(close_status)
56
56
 
57
57
 
58
58
        project = target.lp_branch.project