mirror of
https://github.com/RicterZ/nhentai.git
synced 2026-01-07 22:11:37 +01:00
use Unknown as field value if it is null #269
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user