summaryrefslogtreecommitdiffstats
path: root/deluge/path_chooser_common.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/path_chooser_common.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/path_chooser_common.py')
-rw-r--r--deluge/path_chooser_common.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/deluge/path_chooser_common.py b/deluge/path_chooser_common.py
index 0f93fee..0ea9234 100644
--- a/deluge/path_chooser_common.py
+++ b/deluge/path_chooser_common.py
@@ -1,5 +1,4 @@
#!/usr/bin/env python
-# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Bro <bro.development@gmail.com>
#
@@ -8,12 +7,8 @@
# See LICENSE for more details.
#
-from __future__ import unicode_literals
-
import os
-from deluge.common import PY2
-
def is_hidden(filepath):
def has_hidden_attribute(filepath):
@@ -45,7 +40,7 @@ def get_completion_paths(args):
:param args: options
:type args: dict
:returns: the args argument containing the available completions for the completion_text
- :rtype: list
+ :rtype: dict
"""
args['paths'] = []
@@ -54,10 +49,7 @@ def get_completion_paths(args):
def get_subdirs(dirname):
try:
- if PY2:
- return os.walk(dirname).__next__[1]
- else:
- return next(os.walk(dirname))[1]
+ return next(os.walk(dirname))[1]
except StopIteration:
# Invalid dirname
return []