]> oss.titaniummirror.com Git - webber.git/commitdiff
webber.py: smaller __repr__() string for webber.Directory and
authorHolger Schurig <holgerschurig@gmail.com>
Thu, 13 Jan 2011 11:12:32 +0000 (12:12 +0100)
committerHolger Schurig <holgerschurig@gmail.com>
Thu, 13 Jan 2011 11:12:32 +0000 (12:12 +0100)
webber.File

webber.py

index dab4675b4193b117f76d2d0bde7da72c4293e573..9913e81d0d4041e83149d6fa00982487452ebcf5 100644 (file)
--- a/webber.py
+++ b/webber.py
@@ -60,6 +60,9 @@ class Directory(Holder):
                except IOError:
                        pass
 
+       def __repr__(self):
+               return "<Directory %s>" % self.rel_path
+
 
 files = {}
 current_file = None
@@ -128,6 +131,9 @@ class File(Holder):
 
                self.contents = "".join(txt)
 
+       def __repr__(self):
+               return "<File %s>" % self.rel_path
+
 
 _get_file_for_cache = {}
 def get_file_for(name):