Merge pull request #88 from GaelMagnan/patch-1

Fix UnboundLocalError: 'qbitItems' referenced before assignment
This commit is contained in:
ManiMatter
2024-04-18 09:02:51 +02:00
committed by GitHub

View File

@@ -47,8 +47,8 @@ async def getProtectedAndPrivateFromQbit(settingsDict):
qbitItem['is_private'] = qbitItemProperties.get('is_private', None) # Adds the is_private flag to qbitItem info for simplified logging qbitItem['is_private'] = qbitItemProperties.get('is_private', None) # Adds the is_private flag to qbitItem info for simplified logging
if qbitItemProperties.get('is_private', False): if qbitItemProperties.get('is_private', False):
privateDowloadIDs.append(str.upper(qbitItem['hash'])) privateDowloadIDs.append(str.upper(qbitItem['hash']))
logger.debug('main/getProtectedAndPrivateFromQbit/qbitItems: %s', str([{"hash": str.upper(item["hash"]), "name": item["name"], "tags": item["tags"], "is_private": item.get("is_private", None)} for item in qbitItems]))
logger.debug('main/getProtectedAndPrivateFromQbit/qbitItems: %s', str([{"hash": str.upper(item["hash"]), "name": item["name"], "tags": item["tags"], "is_private": item.get("is_private", None)} for item in qbitItems]))
logger.debug('main/getProtectedAndPrivateFromQbit/protectedDownloadIDs: %s', str(protectedDownloadIDs)) logger.debug('main/getProtectedAndPrivateFromQbit/protectedDownloadIDs: %s', str(protectedDownloadIDs))
logger.debug('main/getProtectedAndPrivateFromQbit/privateDowloadIDs: %s', str(privateDowloadIDs)) logger.debug('main/getProtectedAndPrivateFromQbit/privateDowloadIDs: %s', str(privateDowloadIDs))