Skip to content

Commit

Permalink
DAOTHER-9055 use ConfigInfoAppCc for CC related app support
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezra Peisach committed Dec 24, 2023
1 parent d4a25fc commit 3e43b36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 4 additions & 3 deletions wwpdb/apps/entity_transform/prd/BuildPrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import shutil
import sys

from wwpdb.utils.config.ConfigInfoApp import ConfigInfoAppCommon
from wwpdb.utils.config.ConfigInfoApp import ConfigInfoAppCommon, ConfigInfoAppCc
from wwpdb.apps.entity_transform.prd.BuildPrdUtil import BuildPrdUtil
#

Expand All @@ -44,6 +44,7 @@ def __init__(self, reqObj=None, summaryFile=None, verbose=False, log=sys.stderr)
self.__instanceId = str(self.__reqObj.getValue("instanceid"))
self.__siteId = str(self.__reqObj.getValue("WWPDB_SITE_ID"))
self.__cICommon = ConfigInfoAppCommon(self.__siteId)
self.__cIAppCc = ConfigInfoAppCc(self.__siteId)
#
self.__getSession()
self.__instancePath = os.path.join(self.__sessionPath, "search", self.__instanceId)
Expand Down Expand Up @@ -101,7 +102,7 @@ def __getSession(self):
def __getNewPrdID(self):
""" Get new PRDID from unusedPrdId.lst file
"""
filePath = self.__cICommon.get_unused_prd_file()
filePath = self.__cIAppCc.get_unused_prd_file()
f = open(filePath, "r")
data = f.read()
f.close()
Expand All @@ -110,7 +111,7 @@ def __getNewPrdID(self):
idx = 0
for prdid in idlist:
idx += 1
prdfile = os.path.join(self.__cICommon.get_site_prd_cvs_path(), prdid[len(prdid) - 1], prdid + ".cif")
prdfile = os.path.join(self.__cIAppCc.get_site_prd_cvs_path(), prdid[len(prdid) - 1], prdid + ".cif")
if not os.access(prdfile, os.F_OK):
self.__prdID = prdid
self.__prdccID = self.__prdID.replace("PRD", "PRDCC")
Expand Down
8 changes: 4 additions & 4 deletions wwpdb/apps/entity_transform/prd/UpdatePrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import os
import sys

from wwpdb.utils.config.ConfigInfoApp import ConfigInfoAppCommon
from wwpdb.utils.config.ConfigInfoApp import ConfigInfoAppCc
from wwpdb.apps.entity_transform.prd.ReadFormUtil import ReadFormUtil
#

Expand All @@ -44,7 +44,7 @@ def __init__(self, reqObj=None, verbose=False, log=sys.stderr):

# self.__rltvSessionPath = None
self.__siteId = str(self.__reqObj.getValue("WWPDB_SITE_ID"))
self.__cICommon = ConfigInfoAppCommon(self.__siteId)
self.__cIAppCc = ConfigInfoAppCc(self.__siteId)
#
self.__getSession()
#
Expand Down Expand Up @@ -100,7 +100,7 @@ def __getInputData(self):
def __getNewPrdID(self):
"""
"""
filePath = self.__cICommon.get_unused_prd_file()
filePath = self.__cIAppCc.get_unused_prd_file()
with open(filePath, 'r') as f:
data = f.read()
#
Expand All @@ -109,7 +109,7 @@ def __getNewPrdID(self):
idx = 0
for cid in idlist:
idx += 1
prdfile = os.path.join(self.__cICommon.get_site_prd_cvs_path(), cid[len(cid) - 1], cid + '.cif')
prdfile = os.path.join(self.__cIAppCc.get_site_prd_cvs_path(), cid[len(cid) - 1], cid + '.cif')
if not os.access(prdfile, os.F_OK):
newId = cid
break
Expand Down

0 comments on commit 3e43b36

Please sign in to comment.