Ignore:
Timestamp:
Jul 26, 2015 4:58:27 PM (9 years ago)
Author:
butler
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
fb3f9af
Parents:
e0c16ce
Message:

Fix sphinx compile errors with autogenerated model files. Was including
the path in doc string which for windows uses a slash which ReST
interprets as an escape charater. Was not rendering the source file
correctly for ANY of the generated but was a particular problem for
files that had an f as \f is formfeed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/models/c_extension/python_wrapper/WrapperGenerator.py

    r13e46abe r1f5f206  
    560560    def replaceToken(self, line, key, value): #pylint: disable-msg=R0201 
    561561        """ Replace a token in the template file  
    562             @param line: line of text to inspect 
    563             @param key: token to look for 
    564             @param value: string value to replace the token with 
    565             @return: new string value 
     562            :param line: line of text to inspect 
     563            :param key: token to look for 
     564            :param value: string value to replace the token with 
     565            :return: new string value 
    566566        """ 
     567        _str_value = str(value) 
     568        _new_value = _str_value.replace('\\','/') 
    567569        lenkey = len(key) 
    568570        newline = line 
     
    570572        while newline.count(key) > 0: 
    571573            index = newline.index(key) 
    572             newline = newline[:index] + value + newline[index + lenkey:] 
     574            newline = newline[:index] + _new_value + newline[index + lenkey:] 
    573575 
    574576        return newline 
Note: See TracChangeset for help on using the changeset viewer.