mirror of
https://github.com/sys-nyx/red-arch.git
synced 2025-05-06 00:35:25 -04:00
replace scandir with listdir for Python < 3.5
This commit is contained in:
parent
67a7356ede
commit
8385bb6f66
1 changed files with 4 additions and 1 deletions
|
@ -616,7 +616,10 @@ def get_subs():
|
|||
if not os.path.isdir('data'):
|
||||
print('ERROR: no data, run fetch_links.py first')
|
||||
return subs
|
||||
return [d.name for d in os.scandir('data') if d.is_dir()]
|
||||
for d in os.listdir('data'):
|
||||
if os.path.isdir('data' + '/' + d):
|
||||
subs.append(d)
|
||||
return subs
|
||||
|
||||
def get_pager_html(page_num=1, pages=1):
|
||||
html_pager = ''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue