summaryrefslogtreecommitdiff
path: root/tools/scan-view/share/Reporter.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/scan-view/share/Reporter.py')
-rw-r--r--tools/scan-view/share/Reporter.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tools/scan-view/share/Reporter.py b/tools/scan-view/share/Reporter.py
index 800af03b1a2c3..b1ff16142e279 100644
--- a/tools/scan-view/share/Reporter.py
+++ b/tools/scan-view/share/Reporter.py
@@ -16,7 +16,7 @@ class ReportFailure(Exception):
# Collect information about a bug.
-class BugReport:
+class BugReport(object):
def __init__(self, title, description, files):
self.title = title
self.description = description
@@ -37,7 +37,7 @@ from email.mime.text import MIMEText
# ReporterParameter
#===------------------------------------------------------------------------===#
-class ReporterParameter:
+class ReporterParameter(object):
def __init__(self, n):
self.name = n
def getName(self):
@@ -75,12 +75,12 @@ class SelectionParameter (ReporterParameter):
# Reporters
#===------------------------------------------------------------------------===#
-class EmailReporter:
+class EmailReporter(object):
def getName(self):
return 'Email'
def getParameters(self):
- return map(lambda x:TextParameter(x),['To', 'From', 'SMTP Server', 'SMTP Port'])
+ return [TextParameter(x) for x in ['To', 'From', 'SMTP Server', 'SMTP Port']]
# Lifted from python email module examples.
def attachFile(self, outer, path):
@@ -143,12 +143,12 @@ Description: %s
return "Message sent!"
-class BugzillaReporter:
+class BugzillaReporter(object):
def getName(self):
return 'Bugzilla'
def getParameters(self):
- return map(lambda x:TextParameter(x),['URL','Product'])
+ return [TextParameter(x) for x in ['URL','Product']]
def fileReport(self, report, parameters):
raise NotImplementedError
@@ -174,7 +174,7 @@ class RadarClassificationParameter(SelectionParameter):
else:
return '7'
-class RadarReporter:
+class RadarReporter(object):
@staticmethod
def isAvailable():
# FIXME: Find this .scpt better
@@ -211,7 +211,7 @@ class RadarReporter:
script = os.path.join(os.path.dirname(__file__),'../share/scan-view/FileRadar.scpt')
args = ['osascript', script, component, componentVersion, classification, personID, report.title,
- report.description, diagnosis, config] + map(os.path.abspath, report.files)
+ report.description, diagnosis, config] + [os.path.abspath(f) for f in report.files]
# print >>sys.stderr, args
try:
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)