Permalink
Browse files

add attribute fallback to drop

  • Loading branch information...
1 parent af68aff commit 801a597665348aa3b43662bbfc4a970b4bf6cdab @posativ committed Aug 28, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 regenwolken/specs.py
@@ -148,8 +148,7 @@ def guess_type(filename):
return 'other'
self.__dict__.update(Item(drop, conf))
- self.read, self.length = drop.read, drop.length
- self.filename, self.short_id = drop.filename, drop.short_id
+ self.drop = drop
self.item_type = guess_type(self.filename)
self.url = self.__dict__['content_url']
@@ -218,3 +217,6 @@ def code(self):
cache.set('text-'+self.short_id, rv)
return rv
+
+ def __getattr__(self, attr):
+ return getattr(self.drop, attr)

0 comments on commit 801a597

Please sign in to comment.