diff options
author | Nathan Yergler <nathan@yergler.net> | 2011-10-01 15:10:02 -0700 |
---|---|---|
committer | Nathan Yergler <nathan@yergler.net> | 2011-10-01 15:10:02 -0700 |
commit | 243c3843bd574129caa7663e25d1a843b2d2dd30 (patch) | |
tree | 0171de5e911010b76e86c689bb5f5f8ce86845db /mediagoblin/init | |
parent | 573aba86b58c2ab064d0d57ed0bbae6bdf9a2819 (diff) | |
download | mediagoblin-243c3843bd574129caa7663e25d1a843b2d2dd30.tar.lz mediagoblin-243c3843bd574129caa7663e25d1a843b2d2dd30.tar.xz mediagoblin-243c3843bd574129caa7663e25d1a843b2d2dd30.zip |
Whitespace and formatting cleanup.
* Removed trailing whitespace
* Line length < 80 where possible
* Honor conventions on number of blank lines
* Honor conventions about spaces around :, =
Diffstat (limited to 'mediagoblin/init')
-rw-r--r-- | mediagoblin/init/__init__.py | 18 | ||||
-rw-r--r-- | mediagoblin/init/celery/__init__.py | 2 | ||||
-rw-r--r-- | mediagoblin/init/celery/from_celery.py | 2 | ||||
-rw-r--r-- | mediagoblin/init/config.py | 2 |
4 files changed, 14 insertions, 10 deletions
diff --git a/mediagoblin/init/__init__.py b/mediagoblin/init/__init__.py index b7f52595..f21e2fdd 100644 --- a/mediagoblin/init/__init__.py +++ b/mediagoblin/init/__init__.py @@ -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(): diff --git a/mediagoblin/init/celery/__init__.py b/mediagoblin/init/celery/__init__.py index c58b1305..21ce1d39 100644 --- a/mediagoblin/init/celery/__init__.py +++ b/mediagoblin/init/celery/__init__.py @@ -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 diff --git a/mediagoblin/init/celery/from_celery.py b/mediagoblin/init/celery/from_celery.py index 3e5adb98..05669b67 100644 --- a/mediagoblin/init/celery/from_celery.py +++ b/mediagoblin/init/celery/from_celery.py @@ -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 diff --git a/mediagoblin/init/config.py b/mediagoblin/init/config.py index 029a0956..ae232e91 100644 --- a/mediagoblin/init/config.py +++ b/mediagoblin/init/config.py @@ -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() |