Skip to content

Commit

Permalink
remobe logging from __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyiguo committed Dec 5, 2023
1 parent ae7f57e commit a6ccc6e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/rucio/common/schema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
#import logging
import importlib
from configparser import NoOptionError, NoSectionError
from os import environ
Expand Down Expand Up @@ -66,7 +66,7 @@


def load_schema_for_vo(vo):
logging.error('load_schema_for_vo ***********************************YG')
#logging.error('load_schema_for_vo ***********************************YG')
GENERIC_FALLBACK = 'generic_multi_vo'
if config.config_has_section('policy'):
try:
Expand All @@ -77,25 +77,25 @@ def load_schema_for_vo(vo):
POLICY = config.config_get('policy', 'package-' + vo, check_config_table=False)
check_policy_package_version(POLICY)
POLICY = POLICY + ".schema"
logging.error(f'POLICY1: {POLICY}')
#logging.error(f'POLICY1: {POLICY}')
except (NoOptionError, NoSectionError):
# fall back to old system for now
try:
POLICY = config.config_get('policy', 'schema', check_config_table=False)
except (NoOptionError, NoSectionError):
POLICY = GENERIC_FALLBACK
POLICY = 'rucio.common.schema.' + POLICY.lower()
logging.error(f'POLICY2: {POLICY}')
#logging.error(f'POLICY2: {POLICY}')
else:
POLICY = 'rucio.common.schema.' + GENERIC_FALLBACK.lower()
logging.error(f'POLICY3: {POLICY}')
#logging.error(f'POLICY3: {POLICY}')
try:
module = importlib.import_module(POLICY)
except ImportError:
raise exception.PolicyPackageNotFound('Module ' + POLICY + ' not found')

schema_modules[vo] = module
logging.error(f'module: {module}')
#logging.error(f'module: {module}')


def validate_schema(name, obj, vo='def'):
Expand Down

0 comments on commit a6ccc6e

Please sign in to comment.