Skip to content

Instantly share code, notes, and snippets.

@abutcher
Created July 24, 2012 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save abutcher/3171003 to your computer and use it in GitHub Desktop.
Save abutcher/3171003 to your computer and use it in GitHub Desktop.
Code Walk Results
diff --git a/docs/man/man1/juicer-admin.1.asciidoc.in b/docs/man/man1/juicer-admin.1.asciidoc.in
index 8cf0b0b..10b01d8 100644
--- a/docs/man/man1/juicer-admin.1.asciidoc.in
+++ b/docs/man/man1/juicer-admin.1.asciidoc.in
@@ -5,6 +5,8 @@ juicer-admin(1)
:man version: %VERSION%
:man manual: Pulp repos and release carts
+## WTF IS GOING ON IN HERE?
+
NAME
----
juicer-admin - manage pulp repos, users, and roles
diff --git a/juicer/juicer/Juicer.py b/juicer/juicer/Juicer.py
index 943078f..676b4d1 100644
--- a/juicer/juicer/Juicer.py
+++ b/juicer/juicer/Juicer.py
@@ -294,6 +294,7 @@ class Juicer(object):
juicer.utils.Log.log_debug("Initiating upload for repo '%s'" % repo)
self.upload(env, repo, items)
+ ## Separate out this download link thing.
dl_base = self.connectors[env].base_url.replace('/pulp/api', '/pulp/repos')
for item in items:
link = '%s/%s/%s/%s' % (dl_base, env, repo, os.path.basename(item))
@@ -324,6 +325,10 @@ class Juicer(object):
args = parser.parser.parse_args(("create-repo carts --type file --in %s" % env).split())
juicer.admin.JuicerAdmin.JuicerAdmin(args).create_repo(arch=args.arch, name=args.name, \
type=args.type, envs=args.envs)
+
+ ## Don't let Sam create repos. Take this out and provide a
+ ## script to set it up as part of admin.
+
cart_file = os.path.join(juicer.common.Cart.CART_LOCATION, cart.name)
if not cart_file.endswith('.json'):
diff --git a/juicer/utils/StatusBar.py b/juicer/utils/StatusBar.py
index 70f74c2..47898eb 100644
--- a/juicer/utils/StatusBar.py
+++ b/juicer/utils/StatusBar.py
@@ -18,7 +18,7 @@
import os
import sys
-
+## Fuck this. Let's use a library.
class StatusBar(object):
def __init__(self):
rows, columns = os.popen('stty size', 'r').read().split()
diff --git a/juicer/utils/__init__.py b/juicer/utils/__init__.py
index aa1a777..caf2d84 100644
--- a/juicer/utils/__init__.py
+++ b/juicer/utils/__init__.py
@@ -79,6 +79,8 @@ def _config_file():
config.add_section('prod')
config.set('prod', 'requires_signature')
+ ## Let's write out some comments or something?
+
with open(config_file, 'w') as conf:
config.write(conf)
@@ -123,6 +125,9 @@ def get_login_info():
_defaults = {}
_defaults['cart_dest'] = ''
+ ## ^ cart_dest should be some type of base_env variable for wider
+ ## usage.
+
config.read(_config_file())
_config_test(config)
@@ -296,6 +301,10 @@ def filter_package_list(package_list):
def mute(returns_output=False):
+
+ ## Document this and use returns_output in the calls so people
+ ## know wtf I'm doing.
+
def decorator(func):
@wraps(func)
def wrapper(*args, **kwargs):
@@ -323,6 +332,8 @@ def is_rpm(path):
path_type = m.file(path)
+ ## Remove log debug here.
+
if path_type in rpm_types:
juicer.utils.Log.log_debug("Type check passed for '%s': '%s'" % (path, path_type))
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment