Skip to content

Commit

Permalink
reduce diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
dynilath committed Dec 15, 2018
1 parent cacdfd8 commit 398e799
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xeHentai/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,11 @@ def from_dict(self, j):
self.gid, self.sethash = _[0]
return self


def to_dict(self):
d = dict({k:v for k, v in self.__dict__.items()
if not k.endswith('_q') and not k.startswith("_")})
for k in ['img_q', 'page_q', 'list_q']:
if getattr(self, k):
d[k] = [e for e in getattr(self, k).queue]
return d
return d

0 comments on commit 398e799

Please sign in to comment.