Lint cov.

This commit is contained in:
Hellowlol 2017-10-25 18:34:59 +02:00
parent 0e4d53a74c
commit 2d1e4f02fb
3 changed files with 6 additions and 6 deletions

View file

@ -444,7 +444,7 @@ class PlexClient(PlexObject):
if not self.product != 'OpenPHT': if not self.product != 'OpenPHT':
try: try:
self.sendCommand('timeline/subscribe', port=server_url[1].strip('/'), protocol='http') self.sendCommand('timeline/subscribe', port=server_url[1].strip('/'), protocol='http')
except: except: # noqa: E722
# some clients dont need or like this and raises http 400. # some clients dont need or like this and raises http 400.
# We want to include the exception in the log, # We want to include the exception in the log,
# but it might still work so we swallow it. # but it might still work so we swallow it.

View file

@ -35,7 +35,7 @@ class PlexConfig(ConfigParser):
section, name = key.lower().split('.') section, name = key.lower().split('.')
value = self.data.get(section, {}).get(name, default) value = self.data.get(section, {}).get(name, default)
return cast(value) if cast else value return cast(value) if cast else value
except: except: # noqa: E722
return default return default
def _asDict(self): def _asDict(self):

View file

@ -129,7 +129,7 @@ def rget(obj, attrstr, default=None, delim='.'): # pragma: no cover
if attrstr: if attrstr:
return rget(value, attrstr, default, delim) return rget(value, attrstr, default, delim)
return value return value
except: except: # noqa: E722
return default return default
@ -314,7 +314,7 @@ def tag_helper(tag, items, locked=True, remove=False):
return data return data
def getMyPlexAccount(opts=None): def getMyPlexAccount(opts=None): # pragma: no cover
""" Helper function tries to get a MyPlex Account instance by checking """ Helper function tries to get a MyPlex Account instance by checking
the the following locations for a username and password. This is the the following locations for a username and password. This is
useful to create user-friendly command line tools. useful to create user-friendly command line tools.
@ -341,7 +341,7 @@ def getMyPlexAccount(opts=None):
return MyPlexAccount(username, password) return MyPlexAccount(username, password)
def choose(msg, items, attr): def choose(msg, items, attr): # pragma: no cover
""" Command line helper to display a list of choices, asking the """ Command line helper to display a list of choices, asking the
user to choose one of the options. user to choose one of the options.
""" """