Fixed convention related issues reported by SonarQube.

This commit is contained in:
Aditya Toshniwal
2020-07-09 18:55:33 +05:30
committed by Akshay Joshi
parent 2cefa9afca
commit 357a9179b1
20 changed files with 73 additions and 73 deletions

View File

@@ -10,7 +10,7 @@
import os
from contextlib import contextmanager
from subprocess import call
from pgadmin.utils import u, fs_encoding, file_quote
from pgadmin.utils import u_encode, fs_encoding, file_quote
# enum-like for tracking whether we have
@@ -32,10 +32,10 @@ class JavascriptBundler:
self.js_state = JsState.NEW
except OSError:
webdir_path()
generatedJavascriptDir = os.path.join(
generated_js_dir = os.path.join(
webdir_path(), 'pgadmin', 'static', 'js', 'generated')
if os.path.exists(generatedJavascriptDir) and \
os.listdir(generatedJavascriptDir):
if os.path.exists(generated_js_dir) and \
os.listdir(generated_js_dir):
self.js_state = JsState.OLD
else:
self.js_state = JsState.NONE
@@ -54,8 +54,8 @@ def pushd(new_dir):
def webdir_path():
dirname = os.path.dirname
thisPath = os.path.realpath(u(__file__, fs_encoding))
return dirname(dirname(dirname(dirname(thisPath))))
this_path = os.path.realpath(u_encode(__file__, fs_encoding))
return dirname(dirname(dirname(dirname(this_path))))
def try_building_js():