mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed convention related issues reported by SonarQube.
This commit is contained in:
committed by
Akshay Joshi
parent
2cefa9afca
commit
357a9179b1
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user