fixing some vanilla centos 6 bullshit
This commit is contained in:
parent
ca4a9e4b08
commit
6d191405be
@ -4,7 +4,13 @@
|
||||
# Lets you get a list of files for a given package name(s) without installing
|
||||
# any extra packages (such as yum-utils for repoquery).
|
||||
|
||||
# NOTE: If you're on CentOS 6.x, since it uses such an ancient version of python you need to either install
|
||||
# python-argparse OR just resign to using it for all packages with none of the features.
|
||||
try:
|
||||
import argparse
|
||||
has_argparse = True
|
||||
except ImportError:
|
||||
has_argparse = False
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
@ -124,6 +130,7 @@ def parseArgs():
|
||||
return(args)
|
||||
|
||||
def main():
|
||||
if has_argparse:
|
||||
args = vars(parseArgs().parse_args())
|
||||
args['rpm_files'] = [os.path.abspath(os.path.expanduser(i)) for i in args['rpm_files']]
|
||||
if not any((args['rpm_files'], args['pkgs'])):
|
||||
@ -136,6 +143,8 @@ def main():
|
||||
elif pyver.major == 2:
|
||||
raw_input()
|
||||
args['pkgs'] = all_pkgs()
|
||||
else:
|
||||
args = {'pkgs': all_pkgs()}
|
||||
gf = FileGetter(**args)
|
||||
print(json.dumps(gf.files, indent = 4))
|
||||
return()
|
||||
|
1
net/irc/.gitignore
vendored
Normal file
1
net/irc/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
control2format.pl
|
Loading…
Reference in New Issue
Block a user