From a0a32a214aa72f183f614c212689a28bde8f531a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 20 Feb 2016 10:12:06 +0530 Subject: [PATCH] ... --- src/calibre/srv/content.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/calibre/srv/content.py b/src/calibre/srv/content.py index 9c7f330157..05d52cfd63 100644 --- a/src/calibre/srv/content.py +++ b/src/calibre/srv/content.py @@ -245,10 +245,11 @@ def get(ctx, rd, what, book_id, library_id): sz = rd.query.get('sz') w, h = 60, 80 if sz is None: - try: - w, h = map(int, rest.split('_')) - except Exception: - pass + if rest: + try: + w, h = map(int, rest.split('_')) + except Exception: + pass elif sz == 'full': w = h = None elif 'x' in sz: