From df5291fd4fddeaf2e11a975f5809f9342ed60367 Mon Sep 17 00:00:00 2001 From: Labrys of Knossos Date: Fri, 18 Jan 2019 22:46:54 -0500 Subject: [PATCH] Refactor DELUGEPORT -> DELUGE_PORT --- 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 b761fd9e..1024b16b 100644 --- a/core/__init__.py +++ b/core/__init__.py @@ -160,7 +160,7 @@ TRANSMISSION_USER = None TRANSMISSION_PASSWORD = None DELUGE_HOST = None -DELUGEPORT = None +DELUGE_PORT = 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, DELUGE_HOST, DELUGEPORT, DELUGEUSR, DELUGEPWD, VLEVEL, \ + NOFLATTEN, UTORRENT_PASSWORD, UTORRENT_USER, UTORRENT_WEB_UI, DELUGE_HOST, DELUGE_PORT, 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, \ @@ -416,7 +416,7 @@ def initialize(section=None): TRANSMISSION_PASSWORD = CFG['Torrent']['TransmissionPWD'] # mysecretpwr DELUGE_HOST = CFG['Torrent']['DelugeHost'] # localhost - DELUGEPORT = int(CFG['Torrent']['DelugePort']) # 8084 + DELUGE_PORT = 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 b38da66b..d72437a9 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.DELUGE_HOST, core.DELUGEPORT)) + 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.DELUGEPORT, username=core.DELUGEUSR, + tc.connect(host=core.DELUGE_HOST, port=core.DELUGE_PORT, username=core.DELUGEUSR, password=core.DELUGEPWD) except Exception: logger.error('Failed to connect to Deluge')