summaryrefslogtreecommitdiffstats
path: root/pym/portage/util/lafilefixer.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-07-13 19:31:41 -0700
committerZac Medico <zmedico@gentoo.org>2010-07-13 19:31:41 -0700
commitc30b707e5a98420ef4c780f9f6b60f4e990a2c32 (patch)
tree700df00c3297218c85da5e01fe23e8ea51d40d37 /pym/portage/util/lafilefixer.py
parentf3cdcad7d235e8f1cabe7664a0fc4800a01f129f (diff)
downloadportage-c30b707e5a98420ef4c780f9f6b60f4e990a2c32.tar.gz
portage-c30b707e5a98420ef4c780f9f6b60f4e990a2c32.tar.bz2
portage-c30b707e5a98420ef4c780f9f6b60f4e990a2c32.zip
Use epytext markup in rewrite_lafile() docstring, and add note about
use of raw bytes.
Diffstat (limited to 'pym/portage/util/lafilefixer.py')
-rw-r--r--pym/portage/util/lafilefixer.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/pym/portage/util/lafilefixer.py b/pym/portage/util/lafilefixer.py
index 3c39a49f5..7d6171c16 100644
--- a/pym/portage/util/lafilefixer.py
+++ b/pym/portage/util/lafilefixer.py
@@ -74,10 +74,14 @@ def _parse_lafile_contents(contents):
def rewrite_lafile(contents):
"""
Given the contents of an .la file, parse and fix it.
- Returns a bool, string tuple.
- The bool indicates if the file needs fixing.
- The string contains the fixed contents if the file needs fixing.
+ This operates with strings of raw bytes (assumed to contain some ascii
+ characters), in order to avoid any potential character encoding issues.
Raises 'InvalidData' if the .la file is invalid.
+ @param contents: the contents of a libtool archive file
+ @type contents: bytes
+ @rtype: tuple
+ @returns: (True, fixed_contents) if something needed to be
+ fixed, (False, None) otherwise.
"""
#Parse the 'dependency_libs' and 'inherited_linker_flags' lines.
dep_libs, inh_link_flags = \