summaryrefslogtreecommitdiff
path: root/bin/epkginfo
diff options
context:
space:
mode:
authorWolfgang E. Sanyer <WolfgangESanyer@gmail.com>2021-09-20 08:49:15 -0400
committerMatt Turner <mattst88@gentoo.org>2021-09-20 15:51:52 -0700
commitbbcd72b5fe85fe9bbca1913f8aa22077d94e75d0 (patch)
tree64a38c9e94cad7c800fcd1ca7307632f603e1315 /bin/epkginfo
parent55170b5be88df6d5d8f6e07ecb39fc1a86d3426a (diff)
downloadgentoolkit-bbcd72b5fe85fe9bbca1913f8aa22077d94e75d0.tar.gz
Change tabs to spaces (using autopep8). Also, format repo using black.
The following command was used to change the tabs to spaces: autopep8 --in-place --select=E101,E11,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E133,E20,E211,E22,E224,E224,E226,E227,E228,E231,E241,E242,E251,E252,E26,E265,E266,E27,E301,E302,E303,E304,E305,E306,W291,W293,W391 -r . And then black was run as `black .` on the entire tree Signed-off-by: Wolfgang E. Sanyer <WolfgangESanyer@gmail.com> Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'bin/epkginfo')
-rwxr-xr-xbin/epkginfo54
1 files changed, 28 insertions, 26 deletions
diff --git a/bin/epkginfo b/bin/epkginfo
index 5d3aab2..4cb483e 100755
--- a/bin/epkginfo
+++ b/bin/epkginfo
@@ -6,11 +6,11 @@
"""Shortcut to equery meta"""
__authors__ = (
- 'Douglas Anderson <douglasjanderson@gmail.com>: equery meta',
- 'Ned Ludd <solar@gentoo.org>: first full implimentation'
- 'Eldad Zack <eldad@gentoo.org>: earch',
- 'Eric Olinger <EvvL AT RustedHalo DOT net>: metadata'
- )
+ 'Douglas Anderson <douglasjanderson@gmail.com>: equery meta',
+ 'Ned Ludd <solar@gentoo.org>: first full implimentation'
+ 'Eldad Zack <eldad@gentoo.org>: earch',
+ 'Eric Olinger <EvvL AT RustedHalo DOT net>: metadata'
+)
import sys
@@ -19,32 +19,34 @@ from gentoolkit.equery import mod_usage
from gentoolkit.equery.meta import main, print_help
from portage.exception import AmbiguousPackageName
+
def print_epkginfo_help():
- print(mod_usage(mod_name="epkginfo"))
- print()
- print_help(with_usage=False)
+ print(mod_usage(mod_name="epkginfo"))
+ print()
+ print_help(with_usage=False)
+
equery.initialize_configuration()
args = sys.argv[1:]
if not args or set(('-h', '--help')).intersection(args):
- print_epkginfo_help()
+ print_epkginfo_help()
else:
- try:
- main(args)
- except AmbiguousPackageName as e:
- pkgs = e.args[0]
- for candidate in pkgs:
- print(candidate)
-
- from gentoolkit import pprinter as pp
- from os.path import basename # To get the short name
-
- print(file=sys.stderr)
- print(pp.error("The short ebuild name '%s' is ambiguous. Please specify" % basename(pkgs[0])),
- file=sys.stderr, end="")
- pp.die(1, "one of the above fully-qualified ebuild names instead.")
- except errors.GentoolkitException as err:
- from gentoolkit import pprinter as pp
- pp.die(1, str(err))
+ try:
+ main(args)
+ except AmbiguousPackageName as e:
+ pkgs = e.args[0]
+ for candidate in pkgs:
+ print(candidate)
+
+ from gentoolkit import pprinter as pp
+ from os.path import basename # To get the short name
+
+ print(file=sys.stderr)
+ print(pp.error("The short ebuild name '%s' is ambiguous. Please specify" % basename(pkgs[0])),
+ file=sys.stderr, end="")
+ pp.die(1, "one of the above fully-qualified ebuild names instead.")
+ except errors.GentoolkitException as err:
+ from gentoolkit import pprinter as pp
+ pp.die(1, str(err))
# vim: set ts=4 sw=4 tw=79: