From 9262ba9cd0fc76f44fcad2e76ab3f109759323bd Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Fri, 18 Jan 2019 22:23:14 -0500 Subject: [PATCH] Refactor DELUGEHOST -> DELUGE_HOST --- core/__init__.py | 6 +++--- core/utils/torrents.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/__init__.py b/core/__init__.py index 2d0f44db..b761fd9e 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -159,7 +159,7 @@ TRANSMISSION_PORT = None TRANSMISSION_USER = None TRANSMISSION_PASSWORD = None -DELUGEHOST = None +DELUGE_HOST = None DELUGEPORT = None DELUGEUSR = None DELUGEPWD = 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, DELUGEHOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \ + NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGEPORT, DELUGEUSR, 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, \ @@ -415,7 +415,7 @@ def initialize(section=None): TRANSMISSION_USER = CFG['Torrent']['TransmissionUSR'] # mysecretusr TRANSMISSION_PASSWORD = CFG['Torrent']['TransmissionPWD'] # mysecretpwr - DELUGEHOST = CFG['Torrent']['DelugeHost'] # localhost + DELUGE_HOST = CFG['Torrent']['DelugeHost'] # localhost DELUGEPORT = int(CFG['Torrent']['DelugePort']) # 8084 DELUGEUSR = CFG['Torrent']['DelugeUSR'] # mysecretusr DELUGEPWD = CFG['Torrent']['DelugePWD'] # mysecretpwr diff --git a/core/utils/torrents.py b/core/utils/torrents.py index 60a2ec5d..b38da66b 100644 --- a/core/utils/torrents.py +++ b/core/utils/torrents.py @@ -32,9 +32,9 @@ def create_torrent_class(client_agent): if client_agent == 'deluge': try: - logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.DELUGEHOST, core.DELUGEPORT)) + logger.debug('Connecting to {0}: http://{1}:{2}'.format(client_agent, core.DELUGE_HOST, core.DELUGEPORT)) tc = DelugeClient() - tc.connect(host=core.DELUGEHOST, port=core.DELUGEPORT, username=core.DELUGEUSR, + tc.connect(host=core.DELUGE_HOST, port=core.DELUGEPORT, username=core.DELUGEUSR, password=core.DELUGEPWD) except Exception: logger.error('Failed to connect to Deluge')