mirror of
https://github.com/RicterZ/nhentai.git
synced 2025-04-30 00:00:48 +02:00
use Unknown as field value if it is null #269
This commit is contained in:
parent
b56e5b63a9
commit
9f55223e28
@ -20,9 +20,10 @@ class DoujinshiInfo(dict):
|
|||||||
|
|
||||||
def __getattr__(self, item):
|
def __getattr__(self, item):
|
||||||
try:
|
try:
|
||||||
return dict.__getitem__(self, item)
|
ret = dict.__getitem__(self, item)
|
||||||
|
return ret if ret else 'Unknown'
|
||||||
except KeyError:
|
except KeyError:
|
||||||
return ''
|
return 'Unknown'
|
||||||
|
|
||||||
|
|
||||||
class Doujinshi(object):
|
class Doujinshi(object):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user