Mattwmaster58
commited on
Commit
·
194d4b6
1
Parent(s):
eabed65
pep e731
Browse files- pytube/query.py +2 -2
pytube/query.py
CHANGED
@@ -172,9 +172,9 @@ class StreamQuery:
|
|
172 |
|
173 |
# if every attribute has an integer representation
|
174 |
if all(integer_attr_repr.values()) and integer_attr_repr:
|
175 |
-
key
|
176 |
else:
|
177 |
-
key
|
178 |
|
179 |
fmt_streams = sorted(
|
180 |
self.fmt_streams,
|
|
|
172 |
|
173 |
# if every attribute has an integer representation
|
174 |
if all(integer_attr_repr.values()) and integer_attr_repr:
|
175 |
+
def key(s): return integer_attr_repr[getattr(s, attribute_name)]
|
176 |
else:
|
177 |
+
def key(s): return getattr(s, attribute_name)
|
178 |
|
179 |
fmt_streams = sorted(
|
180 |
self.fmt_streams,
|