File tree Expand file tree Collapse file tree 1 file changed +2
-21
lines changed
Geometry/CMSCommonData/test Expand file tree Collapse file tree 1 file changed +2
-21
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env python
22
33from __future__ import print_function
4+ from FWCore .ParameterSet .pfnInPath import pfnInPath
45import FWCore .ParameterSet .Config as cms
56import sys
67import os
@@ -49,27 +50,7 @@ def callDOMCount(schemaPath, xmlPath):
4950 os .system ("rm %s" % (xmlFilename ))
5051
5152# Find the schema file
52- schema = os .environ ['LOCAL_TOP_DIR' ] + '/src/DetectorDescription/Schema/DDLSchema.xsd'
53- if os .path .isfile (schema ):
54- pass
55- else :
56- # It is an error if the file is not there but the package is
57- packageDirectory = os .environ ['LOCAL_TOP_DIR' ] + '/src/DetectorDescription/Schema'
58- if os .path .isdir (packageDirectory ):
59- print ('Error, schema file not found' )
60- print ('DDLSchema.xsd not found in ' + packageDirectory )
61- print ('Quitting, cannot test XML files without a schema' )
62- sys .exit (0 )
63-
64- # if there is a base release then try to find the file there
65- schema = os .getenv ('CMSSW_RELEASE_BASE' ) + '/src/DetectorDescription/Schema/DDLSchema.xsd'
66- if os .path .isfile (schema ):
67- pass
68- else :
69- print ('Error, schema file not found' )
70- print ('DetectorDescription/Schema/DDLSchema.xsd' )
71- print ('Quitting, cannot test XML files without a schema' )
72- sys .exit (0 )
53+ schema = pfnInPath ("DetectorDescription/Schema/DDLSchema.xsd" ).replace ('file:' ,'' )
7354print ("schema file is:" )
7455print (schema )
7556sys .stdout .flush ()
You can’t perform that action at this time.
0 commit comments