diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 6e3cbac62d1307a908ff57aba567752a79e38e71..d0b0ed9878200ee76b76de1116ffb9202ee42df6 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -948,8 +948,8 @@ def create_https_certificates(ssl_cert, ssl_key): :return: True on success, False on failure """ - assert isinstance(ssl_key, unicode) - assert isinstance(ssl_cert, unicode) + # assert isinstance(ssl_key, unicode) + # assert isinstance(ssl_cert, unicode) try: from OpenSSL import crypto # @UnresolvedImport @@ -1094,7 +1094,7 @@ def md5_for_file(filename, block_size=2 ** 16): :return MD5 hexdigest on success, or None on failure """ - assert isinstance(filename, unicode) + # assert isinstance(filename, unicode) try: with io.open(filename, 'rb') as f: @@ -1559,6 +1559,8 @@ def _setUpSession(session, headers): session = CacheControl(sess=session, cache=caches.FileCache(os.path.join(cache_dir, 'sessions'), use_dir_lock=True), cache_etags=False) # request session clear residual referer + # pylint: disable=C0325 + # These extra parens are necessary! if 'Referer' in session.headers and 'Referer' not in (headers or {}): session.headers.pop('Referer') @@ -1871,10 +1873,9 @@ def isFileLocked(checkfile, writeLockCheck=False): :param writeLockCheck: when true will check if the file is locked for writing (prevents move operations) """ - checkfile = os.path.abspath(checkfile) - assert isinstance(checkfile, unicode) + checkfile = ek(os.path.abspath, checkfile) - if not os.path.exists(checkfile): + if not ek(os.path.exists, checkfile): return True try: f = io.open(checkfile, 'rb')