/usr/lib/python2.7/dist-packages/ricky/cli.py is in python-ricky 0.1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | from ricky.utils import write_changes, fetch_and_upload
from clint import args
def forge_changes():
dist = None
for flag in args.flags:
if flag is None:
break
k, v = (x.strip() for x in flag.split("=", 1))
if k == '--dist':
dist = v
if dist is None:
raise Exception("No dist given with --dist=unstable")
for what in args.files:
changes = write_changes(what, dist)
def upload_package():
opts = {
"dist": "unstable",
"source": None,
"version": None,
"group": None
}
for flag in args.flags:
if flag is None:
break
k, v = (x.strip() for x in flag.split("=", 1))
if k.startswith('--'):
k = k[2:]
opts[k] = v
for k, v in opts.items():
if v is None:
raise KeyError(
"give me --dist=unstable --source=fluxbox --version=1.3.5-1 --group=test"
)
if opts['group']:
opts['X-Debile-Group'] = opts.pop('group')
else:
opts.pop('group')
fetch_and_upload(**opts)
|