- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/web.py
r496 r450 13 13 import traceback 14 14 import xml.sax 15 import xmlrpclib16 15 17 16 #--------------------------------------------------------------------------------------- … … 795 794 #------------------------------------------------------------------------------ 796 795 797 class SendBugReport(Request):798 """A request to send a bug report to the project homepage."""799 _latin2Encoder = codecs.getencoder("iso-8859-2")800 801 def __init__(self, callback, summary, description, email):802 """Construct the request for the given bug report."""803 super(SendBugReport, self).__init__(callback)804 self._summary = summary805 self._description = description806 self._email = email807 808 def run(self):809 """Perform the sending of the bug report."""810 serverProxy = xmlrpclib.ServerProxy("http://mlx.varadiistvan.hu/rpc")811 812 result = Result()813 result.success = False814 815 attributes = {}816 if self._email:817 attributes["reporter"] = self._email818 819 result.ticketID = serverProxy.ticket.create(self._summary, self._description,820 attributes, True)821 print "Created ticket with ID:", result.ticketID822 result.success = True823 824 return result825 826 #------------------------------------------------------------------------------827 828 796 class Handler(threading.Thread): 829 797 """The handler for the web services. … … 867 835 """Send the given ACARS""" 868 836 self._addRequest(SendACARS(callback, acars)) 869 870 def sendBugReport(self, callback, summary, description, email):871 """Send a bug report with the given data."""872 self._addRequest(SendBugReport(callback, summary, description, email))873 837 874 838 def run(self):
Note:
See TracChangeset
for help on using the changeset viewer.