Subversion Repositories freemyipod

Rev

Rev 532 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 532 Rev 549
Line 225... Line 225...
225
 
225
 
226
 
226
 
227
def gethwname(id):
227
def gethwname(id):
228
    try:
228
    try:
229
        from libemcoredata import hwtypes
229
        from libemcoredata import hwtypes
230
        hwtype = hwtypes[id]
230
        hwtype = hwtypes[id][1]
231
    except KeyError:
231
    except KeyError:
232
        hwtype = "UNKNOWN (ID = 0x%X)" % id
232
        hwtype = "UNKNOWN (ID = 0x%X)" % id
233
    return hwtype
233
    return hwtype
234
 
234
 
-
 
235
def gethwid(shortname):
-
 
236
    from libemcoredata import hwtypes
-
 
237
    for hwid in hwtypes:
-
 
238
        if hwtypes[hwid][0] == shortname:
-
 
239
            return hwid
-
 
240
    return False
-
 
241
 
235
 
242
 
236
def trimdoc(docstring):
243
def trimdoc(docstring):
237
    """
244
    """
238
        Trims whitespace from docstrings
245
        Trims whitespace from docstrings
239
    """
246
    """