(self)
return "".join(lines)
Render self as jad file contents
Render self as jad file contents
Render self as jad file contents
def render(self):
        '''Render self as jad file contents'''
        ordered_start = ['MIDlet-Name', 'MIDlet-Version', 'MIDlet-Vendor', 'MIDlet-Jar-URL',
                        'MIDlet-Jar-Size', 'MIDlet-Info-URL', 'MIDlet-1', 'MIDlet-Permissions']
        ordered_end = ['MIDlet-Jar-RSA-SHA1', 'MIDlet-Certificate-1-1',
                        'MIDlet-Certificate-1-2', 'MIDlet-Certificate-1-3',
                        'MIDlet-Certificate-1-4']
        unordered = [key for key in self.keys() if key not in ordered_start and key not in ordered_end]
        props = itertools.chain(ordered_start, sorted(unordered), ordered_end)
        self["MIDlet-Jar-URL"] = _make_address_j2me_safe(self["MIDlet-Jar-URL"], self.use_j2me_endpoint)
        lines = ['%s: %s%s' % (key, self[key], self.line_ending) for key in props if self.get(key) is not None]
        return "".join(lines)
def render ( self ) : ordered_start = [ 'MIDlet-Name' , 'MIDlet-Version' , 'MIDlet-Vendor' , 'MIDlet-Jar-URL' , 'MIDlet-Jar-Size' , 'MIDlet-Info-URL' , 'MIDlet-1' , 'MIDlet-Permissions' ] ordered_end = [ 'MIDlet-Jar-RSA-SHA1' , 'MIDlet-Certificate-1-1' , 'MIDlet-Certificate-1-2' , 'MIDlet-Certificate-1-3' , 'MIDlet-Certificate-1-4' ] unordered = [ key for key in self . keys ( ) if key not in ordered_start and key not in ordered_end ] props = itertools . chain ( ordered_start , sorted ( unordered ) , ordered_end ) self [ "MIDlet-Jar-URL" ] = _make_address_j2me_safe ( self [ "MIDlet-Jar-URL" ] , self . use_j2me_endpoint ) lines = [ '%s: %s%s' % ( key , self [ key ] , self . line_ending ) for key in props if self . get ( key ) is not None ] return "" . join ( lines )