From 74bc6fb5b4b23ffa6c976cafe345f7d69865cede Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Fri, 18 Jan 2019 22:49:00 -0500 Subject: [PATCH] Refactor DELUGEUSR -> DELUGE_USER --- core/__init__.py | 6 +++--- core/utils/torrents.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index 1024b16b..203b507a 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -161,7 +161,7 @@ TRANSMISSION_PASSWORD = None DELUGE_HOST = None DELUGE_PORT = None -DELUGEUSR = None +DELUGE_USER = None DELUGEPWD = None QBITTORRENTHOST = None @@ -256,7 +256,7 @@ def initialize(section=None): NZBTOMEDIA_TIMEOUT, FORKS, FORK_DEFAULT, FORK_FAILED_TORRENT, FORK_FAILED, NOEXTRACTFAILED, SHOWEXTRACT, \ NZBTOMEDIA_BRANCH, NZBTOMEDIA_VERSION, NEWEST_VERSION, NEWEST_VERSION_STRING, VERSION_NOTIFY, SYS_ARGV, CFG, \ SABNZB_NO_OF_ARGUMENTS, SABNZB_0717_NO_OF_ARGUMENTS, CATEGORIES, TORRENT_CLIENTAGENT, USELINK, OUTPUTDIRECTORY, \ - NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGE_PORT, DELUGEUSR, DELUGEPWD, VLEVEL, \ + NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGE_PORT, DELUGE_USER, DELUGEPWD, VLEVEL, \ TRANSMISSION_HOST, TRANSMISSION_PORT, TRANSMISSION_PASSWORD, TRANSMISSION_USER, COMPRESSEDCONTAINER, MEDIACONTAINER, \ METACONTAINER, SECTIONS, ALL_FORKS, TEST_FILE, GENERALOPTS, LOG_GIT, GROUPS, SEVENZIP, CONCAT, VCRF, \ __INITIALIZED__, AUTO_UPDATE, APP_FILENAME, USER_DELAY, APP_NAME, TRANSCODE, DEFAULTS, GIT_PATH, GIT_USER, \ @@ -417,7 +417,7 @@ def initialize(section=None): DELUGE_HOST = CFG['Torrent']['DelugeHost'] # localhost DELUGE_PORT = int(CFG['Torrent']['DelugePort']) # 8084 - DELUGEUSR = CFG['Torrent']['DelugeUSR'] # mysecretusr + DELUGE_USER = CFG['Torrent']['DelugeUSR'] # mysecretusr DELUGEPWD = CFG['Torrent']['DelugePWD'] # mysecretpwr QBITTORRENTHOST = CFG['Torrent']['qBittorrenHost'] # localhost diff --git a/core/utils/torrents.py b/core/utils/torrents.py index d72437a9..1138b952 100644 --- a/core/utils/torrents.py +++ b/core/utils/torrents.py @@ -34,7 +34,7 @@ def create_torrent_class(client_agent): try: logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.DELUGE_HOST, core.DELUGE_PORT)) tc = DelugeClient() - tc.connect(host=core.DELUGE_HOST, port=core.DELUGE_PORT, username=core.DELUGEUSR, + tc.connect(host=core.DELUGE_HOST, port=core.DELUGE_PORT, username=core.DELUGE_USER, password=core.DELUGEPWD) except Exception: logger.error('Failed to connect to Deluge')