mirror of
https://github.com/sakaljurgis/plugin.video.sklk.git
synced 2026-07-08 22:17:43 +00:00
Use future.iterkeys to iterate over dict keys
This commit is contained in:
@@ -14,6 +14,7 @@ from __future__ import unicode_literals
|
|||||||
# Monkey-patch standard libary names to enable Python 3-like behavior
|
# Monkey-patch standard libary names to enable Python 3-like behavior
|
||||||
from future import standard_library
|
from future import standard_library
|
||||||
standard_library.install_aliases()
|
standard_library.install_aliases()
|
||||||
|
from future.utils import iterkeys
|
||||||
# The above strings provide compatibility layer for Python 2
|
# The above strings provide compatibility layer for Python 2
|
||||||
# so the code can work in both versions.
|
# so the code can work in both versions.
|
||||||
# In Python 3 they do nothing and can be safely removed.
|
# In Python 3 they do nothing and can be safely removed.
|
||||||
@@ -98,7 +99,7 @@ def get_categories():
|
|||||||
:return: The list of video categories
|
:return: The list of video categories
|
||||||
:rtype: types.GeneratorType
|
:rtype: types.GeneratorType
|
||||||
"""
|
"""
|
||||||
return VIDEOS.keys()
|
return iterkeys(VIDEOS)
|
||||||
|
|
||||||
|
|
||||||
def get_videos(category):
|
def get_videos(category):
|
||||||
|
|||||||
Reference in New Issue
Block a user