summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorKovensky <diogomfranco@gmail.com>2012-10-01 12:16:55 +0000
committerwm4 <wm4@nowhere>2012-10-01 14:28:29 +0200
commitf9f6ded36c72cbc8264325d505267a6d897b0c87 (patch)
tree253e1df62e672e0c8d00e101f133e2173cc60cbb /TOOLS
parent683966241c7478dc93e6dd5a60f1acc86b5bfdbb (diff)
downloadmpv-f9f6ded36c72cbc8264325d505267a6d897b0c87.tar.bz2
mpv-f9f6ded36c72cbc8264325d505267a6d897b0c87.tar.xz
Fix string.format compatibility with Python 2.6
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/matroska.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/TOOLS/matroska.py b/TOOLS/matroska.py
index 4a672690b6..848b033cbd 100755
--- a/TOOLS/matroska.py
+++ b/TOOLS/matroska.py
@@ -207,7 +207,7 @@ class MatroskaElement(object):
def __init__(self, name, elid, valtype, namespace):
self.name = name
- self.definename = '{}_ID_{}'.format(namespace, name.upper())
+ self.definename = '{0}_ID_{1}'.format(namespace, name.upper())
self.fieldname = camelcase_to_words(name)
self.structname = 'ebml_' + self.fieldname
self.elid = elid
@@ -292,7 +292,7 @@ def generate_C_definitions():
print()
if el.subelements:
print('#define N', el.fieldname)
- print('E_S("{}", {})'.format(el.name, len(el.subelements)))
+ print('E_S("{0}", {1})'.format(el.name, len(el.subelements)))
for subel, multiple in el.subelements:
print('F({0.definename}, {0.fieldname}, {1})'.format(
subel, int(multiple)))
@@ -393,7 +393,7 @@ def parse_one(s, depth, parent, maxlen):
if len(t) < 20:
t = hexlify(t).decode('ascii')
else:
- t = '<skipped {} bytes>'.format(len(t))
+ t = '<skipped {0} bytes>'.format(len(t))
print('binary', t, dec)
elif elem.valtype == 'uint':
print('uint', read_uint(s, length))