summaryrefslogtreecommitdiffstats
path: root/deluge/plugins/Extractor/deluge_extractor/core.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 15:05:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-02-19 16:15:47 +0000
commitb686174b07bd56af4e5ffaa23c24f27f417fc305 (patch)
tree1ce335620d99341d94e88c159c0b9b0f6f0de5a0 /deluge/plugins/Extractor/deluge_extractor/core.py
parentAdding debian version 2.0.3-4. (diff)
downloaddeluge-b686174b07bd56af4e5ffaa23c24f27f417fc305.tar.xz
deluge-b686174b07bd56af4e5ffaa23c24f27f417fc305.zip
Merging upstream version 2.1.1 (Closes: #1026291).
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'deluge/plugins/Extractor/deluge_extractor/core.py')
-rw-r--r--deluge/plugins/Extractor/deluge_extractor/core.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/deluge/plugins/Extractor/deluge_extractor/core.py b/deluge/plugins/Extractor/deluge_extractor/core.py
index 8fa5bd3..23b2a00 100644
--- a/deluge/plugins/Extractor/deluge_extractor/core.py
+++ b/deluge/plugins/Extractor/deluge_extractor/core.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
@@ -11,8 +10,6 @@
# See LICENSE for more details.
#
-from __future__ import unicode_literals
-
import errno
import logging
import os
@@ -37,14 +34,11 @@ if windows_check():
'C:\\Program Files (x86)\\7-Zip\\7z.exe',
]
- try:
- import winreg
- except ImportError:
- import _winreg as winreg # For Python 2.
+ import winreg
try:
hkey = winreg.OpenKey(winreg.HKEY_CURRENT_USER, 'Software\\7-Zip')
- except WindowsError:
+ except OSError:
pass
else:
win_7z_path = os.path.join(winreg.QueryValueEx(hkey, 'Path')[0], '7z.exe')