sound_playfile pylint fixes
This commit is contained in:
parent
a86e43c108
commit
433cb9818b
|
@ -1,10 +1,14 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
"""
|
||||||
|
src/plugins/sound_playfile.py
|
||||||
|
===================================
|
||||||
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import winsound
|
import winsound
|
||||||
|
|
||||||
def connect_plugin(sound_file):
|
def connect_plugin(sound_file):
|
||||||
|
"""Plugin's entry point"""
|
||||||
winsound.PlaySound(sound_file, winsound.SND_FILENAME)
|
winsound.PlaySound(sound_file, winsound.SND_FILENAME)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
import os
|
import os
|
||||||
|
@ -18,7 +22,8 @@ except ImportError:
|
||||||
args, stdout=FNULL, stderr=subprocess.STDOUT, close_fds=True)
|
args, stdout=FNULL, stderr=subprocess.STDOUT, close_fds=True)
|
||||||
|
|
||||||
def connect_plugin(sound_file):
|
def connect_plugin(sound_file):
|
||||||
global play_cmd
|
"""This function implements the entry point."""
|
||||||
|
global play_cmd # pylint: disable=global-statement
|
||||||
|
|
||||||
ext = os.path.splitext(sound_file)[-1]
|
ext = os.path.splitext(sound_file)[-1]
|
||||||
try:
|
try:
|
||||||
|
|
Reference in New Issue
Block a user