diff options
Diffstat (limited to 'deluge/path_chooser_common.py')
-rw-r--r-- | deluge/path_chooser_common.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/deluge/path_chooser_common.py b/deluge/path_chooser_common.py index 0f93feef6..0ea92341c 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 [] |