diff options
Diffstat (limited to 'lib/Pb/__init__.py')
| -rw-r--r-- | lib/Pb/__init__.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Pb/__init__.py b/lib/Pb/__init__.py index bfb9d36..c717cc4 100644 --- a/lib/Pb/__init__.py +++ b/lib/Pb/__init__.py @@ -178,18 +178,17 @@ class Pb(object): s3cli.s3move(self.filepath, "im/{}/{}".format(self._hashdir, self.filename)) self._file_clean_local(); - def file_json(self): - return json.dumps({ + def file_dict(self): + return { 'url' : "%s/im/%s/%s" % (BASE_URL, self._hashdir, self.filename), 'size' : self.file_size, 'width' : "%spx" % self.file_width, 'height' : "%spx" % self.file_height, - }) + } def create(self): - #base methods - if self.__class__.__name__ == 'Pb': - return + #base methods FIXME move into File class + self._file_dimensions() self._file_size_get() self._cleanup(); |
