From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B1336139695 for ; Thu, 16 Feb 2017 21:24:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E13C521C03E; Thu, 16 Feb 2017 21:24:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA55721C038 for ; Thu, 16 Feb 2017 21:24:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D04F934102B for ; Thu, 16 Feb 2017 21:24:42 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 70CBE4A3E for ; Thu, 16 Feb 2017 21:24:41 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1487280242.61c7be050d2cda96d13fc69b31efeb2c4bffebd5.vapier@gentoo> Subject: [gentoo-commits] proj/pax-utils:master commit in: / X-VCS-Repository: proj/pax-utils X-VCS-Files: lddtree.py X-VCS-Directories: / X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 61c7be050d2cda96d13fc69b31efeb2c4bffebd5 X-VCS-Branch: master Date: Thu, 16 Feb 2017 21:24:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 365533a7-945c-4b29-a326-03c698b63080 X-Archives-Hash: 498c7d6d829f35e47366512e74c011ae commit: 61c7be050d2cda96d13fc69b31efeb2c4bffebd5 Author: Mike Frysinger gentoo org> AuthorDate: Thu Feb 16 21:24:02 2017 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Thu Feb 16 21:24:02 2017 +0000 URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=61c7be05 lddtree: move parser logic into a func This keeps the main func a bit cleaner. lddtree.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lddtree.py b/lddtree.py index d1ec9e9..2bfaaae 100755 --- a/lddtree.py +++ b/lddtree.py @@ -641,8 +641,8 @@ def _ActionCopy(options, elf): outdir=options.bindir) -def main(argv): - """The main entry point!""" +def GetParser(): + """Get a CLI parser.""" parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) @@ -699,6 +699,12 @@ def main(argv): action='store_true', default=False, help='Copy over plain (non-ELF) files instead of warn+ignore') + return parser + + +def main(argv): + """The main entry point!""" + parser = GetParser() options = parser.parse_args(argv) paths = options.path