Changeset 409:f7d73ea4b38b in documentViewer for documentViewer.py


Ignore:
Timestamp:
Nov 25, 2010, 9:03:50 AM (13 years ago)
Author:
casties
Branch:
default
Message:

quick fix for broken texturlpath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentViewer.py

    r405 r409  
    284284       
    285285        if viewMode=="auto": # automodus gewaehlt
    286             if docinfo.has_key("textURL") or docinfo.has_key('textURLPath'): #texturl gesetzt und textViewer konfiguriert
     286            if docinfo.has_key("textURL") or docinfo.get('textURLPath',None): #texturl gesetzt und textViewer konfiguriert
    287287                viewMode="text"
    288288            else:
     
    320320           
    321321        if viewMode=="auto": # automodus gewaehlt
    322             if docinfo.has_key('textURL') or docinfo.has_key('textURLPath'): #texturl gesetzt und textViewer konfiguriert
     322            if docinfo.has_key('textURL') or docinfo.get('textURLPath',None): #texturl gesetzt und textViewer konfiguriert
    323323                viewMode="text_dict"
    324324            else:
     
    797797            logging.error("documentViewer (getdocinfo) unknown mode: %s!"%mode)
    798798            raise ValueError("Unknown mode %s! Has to be one of 'texttool','imagepath','filepath'."%(mode))
    799                        
     799               
     800        # FIXME: fake texturlpath
     801        if not docinfo.has_key('textURLPath'):
     802            docinfo['textURLPath'] = None
     803       
    800804        logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo)
    801805        #logging.debug("documentViewer (getdocinfo) docinfo: %s"%)
Note: See TracChangeset for help on using the changeset viewer.