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':
try:
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.
# We want to include the exception in the log,
# but it might still work so we swallow it.

View file

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

View file

@ -129,7 +129,7 @@ def rget(obj, attrstr, default=None, delim='.'): # pragma: no cover
if attrstr:
return rget(value, attrstr, default, delim)
return value
except:
except: # noqa: E722
return default
@ -243,7 +243,7 @@ def download(url, filename=None, savepath=None, session=None, chunksize=4024,
mocked (bool): Helper to do evertything except write the file.
unpack (bool): Unpack the zip file.
showstatus(bool): Display a progressbar.
Example:
>>> download(a_episode.getStreamURL(), a_episode.location)
/path/to/file
@ -314,7 +314,7 @@ def tag_helper(tag, items, locked=True, remove=False):
return data
def getMyPlexAccount(opts=None):
def getMyPlexAccount(opts=None): # pragma: no cover
""" Helper function tries to get a MyPlex Account instance by checking
the the following locations for a username and password. This is
useful to create user-friendly command line tools.
@ -341,7 +341,7 @@ def getMyPlexAccount(opts=None):
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
user to choose one of the options.
"""