Changeset 326:cee8a7512e56


Ignore:
Timestamp:
10/21/12 05:45:43 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The ACARS text is converted to latin-2, and normal round parentheses are used instead of square brackets (#135)

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r324 r326  
    473473        """Get the message for the given NAV radio setting."""
    474474        message = u"%s frequency: %s MHz" % (logName, frequency)
    475         if obs is not None: message += u" [%d\u00b0]" % (obs,)
     475        if obs is not None: message += u" (%d\u00b0)" % (obs,)
    476476        return message
    477477   
  • src/mlx/web.py

    r313 r326  
    676676
    677677    def run(self):
    678         """Perform the retrieval opf the METARs."""
     678        """Perform the sending of the PIREP."""
    679679        url = "http://www.virtualairlines.hu/malevacars.php"
     680        #url = "http://localhost:15000"
    680681
    681682        pirep = self._pirep
    682683
    683684        data = {}
    684         data["acarsdata"] = pirep.getACARSText()
     685        data["acarsdata"] = SendPIREP._latin2Encoder(pirep.getACARSText())[0]
    685686
    686687        bookedFlight = pirep.bookedFlight
     
    729730        data["insdate"] = datetime.date.today().strftime("%Y-%m-%d")
    730731
    731         f = urllib2.urlopen(url, urllib.urlencode(data), timeout = 10.0)
     732        postData = urllib.urlencode(data)
     733        f = urllib2.urlopen(url, postData, timeout = 10.0)
    732734        try:
    733735            result = Result()
Note: See TracChangeset for help on using the changeset viewer.