Mattwmaster58 commited on
Commit
194d4b6
·
1 Parent(s): eabed65
Files changed (1) hide show
  1. 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 = lambda s: integer_attr_repr[getattr(s, attribute_name)]
176
  else:
177
- key = lambda s: getattr(s, attribute_name)
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,