Whitespace and formatting cleanup.

* Removed trailing whitespace
* Line length < 80 where possible
* Honor conventions on number of blank lines
* Honor conventions about spaces around :, =
This commit is contained in:
Nathan Yergler
2011-10-01 15:10:02 -07:00
parent 573aba86b5
commit 243c3843bd
38 changed files with 135 additions and 113 deletions

View File

@@ -29,8 +29,12 @@ from mediagoblin.workbench import WorkbenchManager
from mediagoblin.storage import storage_system_from_config
class Error(Exception): pass
class ImproperlyConfigured(Error): pass
class Error(Exception):
pass
class ImproperlyConfigured(Error):
pass
def setup_global_and_app_config(config_path):
@@ -76,8 +80,8 @@ def setup_database():
"in fact they appear to be from the future?!")
setup_globals(
db_connection = connection,
database = db)
db_connection=connection,
database=db)
return connection, db
@@ -126,8 +130,8 @@ def setup_storage():
queue_store = storage_system_from_config(global_config[key_long])
setup_globals(
public_store = public_store,
queue_store = queue_store)
public_store=public_store,
queue_store=queue_store)
return public_store, queue_store
@@ -137,7 +141,7 @@ def setup_workbench():
workbench_manager = WorkbenchManager(app_config['workbench_path'])
setup_globals(workbench_manager = workbench_manager)
setup_globals(workbench_manager=workbench_manager)
def setup_beaker_cache():

View File

@@ -84,6 +84,6 @@ def setup_celery_from_config(app_config, global_config,
for key, value in celery_settings.iteritems():
setattr(this_module, key, value)
if set_environ:
os.environ['CELERY_CONFIG_MODULE'] = settings_module

View File

@@ -44,7 +44,7 @@ def setup_self(check_environ_for_conf=True, module_name=OUR_MODULENAME,
if not os.path.exists(mgoblin_conf_file):
raise IOError(
"MEDIAGOBLIN_CONFIG not set or file does not exist")
# By setting the environment variable here we should ensure that
# this is the module that gets set up.
os.environ['CELERY_CONFIG_MODULE'] = module_name

View File

@@ -73,7 +73,7 @@ def read_mediagoblin_config(config_path, config_spec=CONFIG_SPEC_PATH):
# For now the validator just works with the default functions,
# but in the future if we want to add additional validation/configuration
# functions we'd add them to validator.functions here.
#
#
# See also:
# http://www.voidspace.org.uk/python/validate.html#adding-functions
validator = Validator()