- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/web.py
r450 r496 13 13 import traceback 14 14 import xml.sax 15 import xmlrpclib 15 16 16 17 #--------------------------------------------------------------------------------------- … … 794 795 #------------------------------------------------------------------------------ 795 796 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 = summary 805 self._description = description 806 self._email = email 807 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 = False 814 815 attributes = {} 816 if self._email: 817 attributes["reporter"] = self._email 818 819 result.ticketID = serverProxy.ticket.create(self._summary, self._description, 820 attributes, True) 821 print "Created ticket with ID:", result.ticketID 822 result.success = True 823 824 return result 825 826 #------------------------------------------------------------------------------ 827 796 828 class Handler(threading.Thread): 797 829 """The handler for the web services. … … 835 867 """Send the given ACARS""" 836 868 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)) 837 873 838 874 def run(self):
Note:
See TracChangeset
for help on using the changeset viewer.