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).
|
||||||
|
|
||||||
import argparse
|
# 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 json
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -124,18 +130,21 @@ def parseArgs():
|
|||||||
return(args)
|
return(args)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = vars(parseArgs().parse_args())
|
if has_argparse:
|
||||||
args['rpm_files'] = [os.path.abspath(os.path.expanduser(i)) for i in args['rpm_files']]
|
args = vars(parseArgs().parse_args())
|
||||||
if not any((args['rpm_files'], args['pkgs'])):
|
args['rpm_files'] = [os.path.abspath(os.path.expanduser(i)) for i in args['rpm_files']]
|
||||||
prompt_str = ('You have not specified any package names.\nThis means we will get file lists for EVERY SINGLE '
|
if not any((args['rpm_files'], args['pkgs'])):
|
||||||
'installed package.\nThis is a LOT of output and can take a few moments.\nIf this was a mistake, '
|
prompt_str = ('You have not specified any package names.\nThis means we will get file lists for EVERY SINGLE '
|
||||||
'you can hit ctrl-c now.\nOtherwise, hit the enter key to continue.\n')
|
'installed package.\nThis is a LOT of output and can take a few moments.\nIf this was a mistake, '
|
||||||
sys.stderr.write(prompt_str)
|
'you can hit ctrl-c now.\nOtherwise, hit the enter key to continue.\n')
|
||||||
if pyver.major >= 3:
|
sys.stderr.write(prompt_str)
|
||||||
input()
|
if pyver.major >= 3:
|
||||||
elif pyver.major == 2:
|
input()
|
||||||
raw_input()
|
elif pyver.major == 2:
|
||||||
args['pkgs'] = all_pkgs()
|
raw_input()
|
||||||
|
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