Check that the USER_CSS directory exists
This commit is contained in:
parent
5ac0d29f00
commit
c352fa6378
@ -178,11 +178,12 @@ def load_on_reg(dbstate, uistate, plugin):
|
|||||||
path_img_48x48("gramps-geo-mainmap.png"), None, [], [] ],
|
path_img_48x48("gramps-geo-mainmap.png"), None, [], [] ],
|
||||||
]
|
]
|
||||||
# If we add css user files, we must restart gramps to use them.
|
# If we add css user files, we must restart gramps to use them.
|
||||||
list_files = os.listdir(USER_CSS)
|
if os.path.exists(USER_CSS):
|
||||||
for cssfile in list_files:
|
list_files = os.listdir(USER_CSS)
|
||||||
CSS_FILES.append([cssfile, 1, cssfile.replace('.css', ''),
|
for cssfile in list_files:
|
||||||
os.path.join(USER_CSS,cssfile),
|
CSS_FILES.append([cssfile, 1, cssfile.replace('.css', ''),
|
||||||
None, [], [] ])
|
os.path.join(USER_CSS,cssfile),
|
||||||
|
None, [], [] ])
|
||||||
return CSS_FILES
|
return CSS_FILES
|
||||||
|
|
||||||
def process_list(data):
|
def process_list(data):
|
||||||
|
Loading…
Reference in New Issue
Block a user