Skip to content

Commit

Permalink
Rename non-public method MediaInfo._parse_xml_data_into_dom
Browse files Browse the repository at this point in the history
  • Loading branch information
sbraz committed Nov 7, 2017
1 parent 05ae189 commit 55da382
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pymediainfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def to_data(self):

class MediaInfo(object):
def __init__(self, xml):
self.xml_dom = MediaInfo.parse_xml_data_into_dom(xml)
self.xml_dom = MediaInfo._parse_xml_data_into_dom(xml)

@staticmethod
def parse_xml_data_into_dom(xml_data):
def _parse_xml_data_into_dom(xml_data):
try:
return ET.fromstring(xml_data.encode("utf-8"))
except:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_pymediainfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def setUp(self):
with open(os.path.join(data_dir, 'invalid.xml'), 'r') as f:
self.xml_data = f.read()
def test_parse_invalid_xml(self):
mi = MediaInfo(MediaInfo.parse_xml_data_into_dom(self.xml_data))
mi = MediaInfo(MediaInfo._parse_xml_data_into_dom(self.xml_data))
self.assertEqual(len(mi.tracks), 0)

class MediaInfoLibraryTest(unittest.TestCase):
Expand Down

0 comments on commit 55da382

Please sign in to comment.