Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
authorAditi Mittal <aditi.iitr@gmail.com>
Mon, 9 Sep 2013 16:23:56 +0000 (21:53 +0530)
committerAditi Mittal <aditi.iitr@gmail.com>
Mon, 9 Sep 2013 16:23:56 +0000 (21:53 +0530)
1  2 
mediagoblin/processing/__init__.py

index 9dcdf13ce44329c205512b738ac71ad0fedbcdc2,246091d61481c976e629cbf9f7b2b804a98e46be..3b36fca9b467d8fb515a5154f8819f6112f39b0f
  # You should have received a copy of the GNU Affero General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
- from collections import OrderedDict
+ # Use an ordered dict if we can.  If not, we'll just use a normal dict
+ # later.
+ try:
+     from collections import OrderedDict
+ except:
+     OrderedDict = None
  import logging
  import os
  
@@@ -187,7 -193,10 +193,10 @@@ class ProcessingManager(object)
      """
      def __init__(self):
          # Dict of all MediaProcessors of this media type
-         self.processors = OrderedDict()
+         if OrderedDict is not None:
+             self.processors = OrderedDict()
+         else:
+             self.processors = {}
  
      def add_processor(self, processor):
          """
@@@ -392,7 -401,7 +401,7 @@@ class BaseProcessingFail(Exception)
      subclass from.
  
      You shouldn't call this itself; instead you should subclass it
 -    and provid the exception_path and general_message applicable to
 +    and provide the exception_path and general_message applicable to
      this error.
      """
      general_message = u''