1. Sultan Imanhodjaev
  2. Yamdi

Commits

Sultan Imanhodjaev  committed 7077d3e

* Fixed violation of isolation at frames.KeyFrame.get method

  • Participants
  • Parent commits 3de5a0c
  • Branches default

Comments (0)

Files changed (1)

File frames.py

View file
  • Ignore whitespace
         self.file_position = file_position
 
     def all_from_xml(self, metadata):
-        times = self.get(soup=metadata, tag="times", func=float)
-        file_positions = self.get(soup=metadata, tag="filepositions", func=int)
+        self.metadata = metadata
+        times = self.get(tag="times", func=float)
+        file_positions = self.get(tag="filepositions", func=int)
         keyframes = []
 
         for cnt in range(len(times)):
 
         return keyframes
 
-    def get(self, soup, tag, func):
-        self.metadata = soup
+    def get(self, tag, func):
         results = []
 
         for time in self.value(tag=tag):
             target = soup.first(tag)
         else:
             target = self.metadata.first(tag)
-        return "".join(target.contents) if first else self.metadata(tag)
+        return "".join(target.contents) if first else self.metadata(tag)