Less indentation

main
Bob Mottram 2020-06-02 10:05:55 +01:00
parent 36381b9fcf
commit 20a24edaa8
1 changed files with 14 additions and 12 deletions

View File

@ -2233,7 +2233,8 @@ def clearQueueItems(baseDir: str, queue: []) -> None:
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
for account in dirs:
queueDir = baseDir + '/accounts/' + account + '/queue'
if os.path.isdir(queueDir):
if not os.path.isdir(queueDir):
continue
for queuesubdir, queuedirs, queuefiles in os.walk(queueDir):
for qfile in queuefiles:
try:
@ -2252,7 +2253,8 @@ def restoreQueueItems(baseDir: str, queue: []) -> None:
for subdir, dirs, files in os.walk(baseDir + '/accounts'):
for account in dirs:
queueDir = baseDir + '/accounts/' + account + '/queue'
if os.path.isdir(queueDir):
if not os.path.isdir(queueDir):
continue
for queuesubdir, queuedirs, queuefiles in os.walk(queueDir):
for qfile in queuefiles:
queue.append(os.path.join(queueDir, qfile))