
"""Verifies that the histograms XML file is well-formatted."""

import extract_histograms


def main():
  # This will raise an exception if the file is not well-formatted.
  histograms = extract_histograms.ExtractHistograms('histograms.xml')


if __name__ == '__main__':
  main()



"""Verifies that the histograms XML file is well-formatted."""

import extract_histograms
import os.path


def main():
  # This will raise an exception if the file is not well-formatted.
  xml_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                          'histograms.xml')
  histograms = extract_histograms.ExtractHistograms(xml_file)


if __name__ == '__main__':
  main()


Make it possible to run the histograms XML validator from directories other than tools/metrics/histograms.
Make it possible to run the histograms XML validator from directories other than tools/metrics/histograms.

Review URL: https://codereview.chromium.org/80433003

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@236508 0039d316-1c4b-4281-b951-d872f2087c98

  
  """Verifies that the histograms XML file is well-formatted."""
  
  import extract_histograms
+ import os.path
  
  
  def main():
    # This will raise an exception if the file is not well-formatted.
+   xml_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
+                           'histograms.xml')
-   histograms = extract_histograms.ExtractHistograms('histograms.xml')
+   histograms = extract_histograms.ExtractHistograms(xml_file)
  
  
  if __name__ == '__main__':
    main()
  
  
Make it possible to run the histograms XML validator from directories other than tools/metrics/histograms.
## Code Before:

"""Verifies that the histograms XML file is well-formatted."""

import extract_histograms


def main():
  # This will raise an exception if the file is not well-formatted.
  histograms = extract_histograms.ExtractHistograms('histograms.xml')


if __name__ == '__main__':
  main()


## Instruction:
Make it possible to run the histograms XML validator from directories other than tools/metrics/histograms.
## Code After:

"""Verifies that the histograms XML file is well-formatted."""

import extract_histograms
import os.path


def main():
  # This will raise an exception if the file is not well-formatted.
  xml_file = os.path.join(os.path.dirname(os.path.realpath(__file__)),
                          'histograms.xml')
  histograms = extract_histograms.ExtractHistograms(xml_file)


if __name__ == '__main__':
  main()

