Fixing manual tyop: MediaGoblin, not MediaGobiin (thanks gandaro!)
[mediagoblin.git] / mediagoblin / workbench.py
index 722f8e27445e32a53f12f2e909b2135badb5793e..2331b5511e59ffa377e856ab0a14b0cd8649167c 100644 (file)
@@ -1,5 +1,5 @@
 # GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011 MediaGoblin contributors.  See AUTHORS.
+# Copyright (C) 2011, 2012 MediaGoblin contributors.  See AUTHORS.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU Affero General Public License as published by
@@ -42,10 +42,15 @@ class Workbench(object):
 
     def __unicode__(self):
         return unicode(self.dir)
+
     def __str__(self):
         return str(self.dir)
+
     def __repr__(self):
-        return repr(self.dir)
+        try:
+            return str(self)
+        except AttributeError:
+            return 'None'
 
     def joinpath(self, *args):
         return os.path.join(self.dir, *args)
@@ -140,7 +145,7 @@ class WorkbenchManager(object):
         self.base_workbench_dir = os.path.abspath(base_workbench_dir)
         if not os.path.exists(self.base_workbench_dir):
             os.makedirs(self.base_workbench_dir)
-        
+
     def create_workbench(self):
         """
         Create and return the path to a new workbench (directory).