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
|
# Lets you get a list of files for a given package name(s) without installing
|
||||||
# any extra packages (such as yum-utils for repoquery).
|
# 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
|
import argparse
|
||||||
|
has_argparse = True
|
||||||
|
except ImportError:
|
||||||
|
has_argparse = False
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -124,6 +130,7 @@ def parseArgs():
|
|||||||
return(args)
|
return(args)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
if has_argparse:
|
||||||
args = vars(parseArgs().parse_args())
|
args = vars(parseArgs().parse_args())
|
||||||
args['rpm_files'] = [os.path.abspath(os.path.expanduser(i)) for i in args['rpm_files']]
|
args['rpm_files'] = [os.path.abspath(os.path.expanduser(i)) for i in args['rpm_files']]
|
||||||
if not any((args['rpm_files'], args['pkgs'])):
|
if not any((args['rpm_files'], args['pkgs'])):
|
||||||
@ -136,6 +143,8 @@ def main():
|
|||||||
elif pyver.major == 2:
|
elif pyver.major == 2:
|
||||||
raw_input()
|
raw_input()
|
||||||
args['pkgs'] = all_pkgs()
|
args['pkgs'] = all_pkgs()
|
||||||
|
else:
|
||||||
|
args = {'pkgs': all_pkgs()}
|
||||||
gf = FileGetter(**args)
|
gf = FileGetter(**args)
|
||||||
print(json.dumps(gf.files, indent = 4))
|
print(json.dumps(gf.files, indent = 4))
|
||||||
return()
|
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