Removing unnecessary "setup_plugin()" calls, as pointed out by Velmont.
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 25 Aug 2013 18:59:34 +0000 (13:59 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 25 Aug 2013 18:59:34 +0000 (13:59 -0500)
mediagoblin/media_types/ascii/__init__.py
mediagoblin/media_types/image/__init__.py
mediagoblin/media_types/pdf/__init__.py
mediagoblin/media_types/stl/__init__.py
mediagoblin/media_types/video/__init__.py

index b0f7551df42f26fb669e220fdfd8c482f534e062..1ee44988da94be15d09cb23a36a61691c0074dd3 100644 (file)
 from mediagoblin.media_types import MediaManagerBase
 from mediagoblin.media_types.ascii.processing import AsciiProcessingManager, \
     sniff_handler
-from mediagoblin.tools import pluginapi
 
 ACCEPTED_EXTENSIONS = ["txt", "asc", "nfo"]
 MEDIA_TYPE = 'mediagoblin.media_types.ascii'
 
 
-def setup_plugin():
-    config = pluginapi.get_config(MEDIA_TYPE)
-
-
 class ASCIIMediaManager(MediaManagerBase):
     human_readable = "ASCII"
     display_template = "mediagoblin/media_displays/ascii.html"
@@ -39,7 +34,6 @@ def get_media_type_and_manager(ext):
 
 
 hooks = {
-    'setup': setup_plugin,
     'get_media_type_and_manager': get_media_type_and_manager,
     ('media_manager', MEDIA_TYPE): lambda: ASCIIMediaManager,
     ('reprocess_manager', MEDIA_TYPE): lambda: AsciiProcessingManager,
index 99643409939b135a1dcbbef426ec6f281920661b..06e0f08f888dd0bfab895a8101cae0bb001b4557 100644 (file)
@@ -19,7 +19,7 @@ import logging
 from mediagoblin.media_types import MediaManagerBase
 from mediagoblin.media_types.image.processing import sniff_handler, \
         ImageProcessingManager
-from mediagoblin.tools import pluginapi
+
 
 _log = logging.getLogger(__name__)
 
@@ -28,10 +28,6 @@ ACCEPTED_EXTENSIONS = ["jpg", "jpeg", "png", "gif", "tiff"]
 MEDIA_TYPE = 'mediagoblin.media_types.image'
 
 
-def setup_plugin():
-    config = pluginapi.get_config('mediagoblin.media_types.image')
-
-
 class ImageMediaManager(MediaManagerBase):
     human_readable = "Image"
     display_template = "mediagoblin/media_displays/image.html"
@@ -67,7 +63,6 @@ def get_media_type_and_manager(ext):
 
 
 hooks = {
-    'setup': setup_plugin,
     'get_media_type_and_manager': get_media_type_and_manager,
     'sniff_handler': sniff_handler,
     ('media_manager', MEDIA_TYPE): lambda: ImageMediaManager,
index bc5c373b4dafe10a46be5a36e68746b580633362..de70389efae07bc9143512da176d3b7dff083aff 100644 (file)
 from mediagoblin.media_types import MediaManagerBase
 from mediagoblin.media_types.pdf.processing import PdfProcessingManager, \
     sniff_handler
-from mediagoblin.tools import pluginapi
+
 
 ACCEPTED_EXTENSIONS = ['pdf']
 MEDIA_TYPE = 'mediagoblin.media_types.pdf'
 
 
-def setup_plugin():
-    config = pluginapi.get_config(MEDIA_TYPE)
-
-
 class PDFMediaManager(MediaManagerBase):
     human_readable = "PDF"
     display_template = "mediagoblin/media_displays/pdf.html"
@@ -39,7 +35,6 @@ def get_media_type_and_manager(ext):
 
 
 hooks = {
-    'setup': setup_plugin,
     'get_media_type_and_manager': get_media_type_and_manager,
     'sniff_handler': sniff_handler,
     ('media_manager', MEDIA_TYPE): lambda: PDFMediaManager,
index 7170a45bb74ef9d9075c4550ee3b466c6da67d00..d5b56b4b893f0d3e02feacd6b408e3964e4271aa 100644 (file)
 from mediagoblin.media_types import MediaManagerBase
 from mediagoblin.media_types.stl.processing import StlProcessingManager, \
     sniff_handler
-from mediagoblin.tools import pluginapi
+
 
 MEDIA_TYPE = 'mediagoblin.media_types.stl'
 ACCEPTED_EXTENSIONS = ["obj", "stl"]
 
 
-def setup_plugin():
-    config = pluginapi.get_config(MEDIA_TYPE)
-
-
 class STLMediaManager(MediaManagerBase):
     human_readable = "stereo lithographics"
     display_template = "mediagoblin/media_displays/stl.html"
@@ -38,7 +34,6 @@ def get_media_type_and_manager(ext):
         return MEDIA_TYPE, STLMediaManager
 
 hooks = {
-    'setup': setup_plugin,
     'get_media_type_and_manager': get_media_type_and_manager,
     'sniff_handler': sniff_handler,
     ('media_manager', MEDIA_TYPE): lambda: STLMediaManager,
index 0ed19d1bb28248a7caea5536c28ee925dd00ee3d..c85cc0b2303f1cbde443b62a4d465c73f211e084 100644 (file)
 from mediagoblin.media_types import MediaManagerBase
 from mediagoblin.media_types.video.processing import VideoProcessingManager, \
     sniff_handler
-from mediagoblin.tools import pluginapi
+
 
 MEDIA_TYPE = 'mediagoblin.media_types.video'
 ACCEPTED_EXTENSIONS = [
         "mp4", "mov", "webm", "avi", "3gp", "3gpp", "mkv", "ogv", "m4v"]
 
 
-def setup_plugin():
-    config = pluginapi.get_config(MEDIA_TYPE)
-
-
 class VideoMediaManager(MediaManagerBase):
     human_readable = "Video"
     display_template = "mediagoblin/media_displays/video.html"
@@ -43,7 +39,6 @@ def get_media_type_and_manager(ext):
         return MEDIA_TYPE, VideoMediaManager
 
 hooks = {
-    'setup': setup_plugin,
     'get_media_type_and_manager': get_media_type_and_manager,
     'sniff_handler': sniff_handler,
     ('media_manager', MEDIA_TYPE): lambda: VideoMediaManager,