From 2755b029d873f93d91086b3d69a4c57d05c40fb5 Mon Sep 17 00:00:00 2001 From: Pepper Date: Wed, 23 Sep 2015 02:40:24 -0400 Subject: minor corrections --- lib/Pb/__init__.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'lib/Pb/__init__.py') 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(); -- cgit v1.2.3-70-g09d2