Navigation Menu

Skip to content

Commit

Permalink
[hdfs] Fix webhdfs code issues (#2896)
Browse files Browse the repository at this point in the history
- Remove unwanted semi-colon
- Fix variable naming
  • Loading branch information
Harshg999 committed Jun 21, 2022
1 parent f33cbc4 commit e1b42d7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions desktop/libs/hadoop/src/hadoop/fs/webhdfs.py
Expand Up @@ -46,10 +46,10 @@
from hadoop.hdfs_site import get_nn_sentry_prefixes, get_umask_mode, get_supergroup, get_webhdfs_ssl

if sys.version_info[0] > 2:
from urllib.parse import unquote as urllib_quote, urlparse
from urllib.parse import unquote as urllib_unquote, urlparse
from django.utils.translation import gettext as _
else:
from urllib import unquote as urllib_quote
from urllib import unquote as urllib_unquote
from urlparse import urlparse
from django.utils.translation import ugettext as _

Expand Down Expand Up @@ -90,7 +90,7 @@ def __init__(
self._logical_name = logical_name
self._supergroup = hdfs_supergroup
self._scheme = ""
self._netloc = "";
self._netloc = ""
self._is_remote = False
self._has_trash_support = True
self.expiration = None
Expand Down Expand Up @@ -571,8 +571,8 @@ def read_url(self, path, offset=0, length=None, bufsize=None):
del params['doas']
if 'user.name' in params:
del params['user.name']
quoted_path = urllib_quote(smart_str(path))
return self._client._make_url(quoted_path, params)
unquoted_path = urllib_unquote(smart_str(path))
return self._client._make_url(unquoted_path, params)

def read(self, path, offset, length, bufsize=None):
"""
Expand Down

0 comments on commit e1b42d7

Please sign in to comment.