commit: 8acbe7d7e28769dea0445df81106ef6dbf7b55ec Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Fri Sep 19 18:55:32 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com> CommitDate: Sat Sep 20 04:49:34 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8acbe7d7
xattr-helper: Migrate docstrings to a variable Due to python optimizations, __doc__ are removed. Reviewed by: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache.Org> --- bin/xattr-helper.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/xattr-helper.py b/bin/xattr-helper.py index ea83a5e..3e9b81e 100755 --- a/bin/xattr-helper.py +++ b/bin/xattr-helper.py @@ -2,7 +2,7 @@ # Copyright 2012-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -"""Dump and restore extended attributes. +doc = """Dump and restore extended attributes. We use formats like that used by getfattr --dump. This is meant for shell helpers to save/restore. If you're looking for a python/portage API, see @@ -10,6 +10,8 @@ portage.util.movefile._copyxattr instead. https://en.wikipedia.org/wiki/Extended_file_attributes """ +__doc__ = doc + import array import os @@ -147,7 +149,7 @@ def restore_xattrs(file_in): def main(argv): - parser = ArgumentParser(description=__doc__) + parser = ArgumentParser(description=doc) parser.add_argument('paths', nargs='*', default=[]) actions = parser.add_argument_group('Actions')
