Ignore the pylint warning of raising-bad-type and unbalanced-tuple-unpacking in conne... 62/311962/1 master
authorzhouhao <haozhou.zhou@samsung.com>
Fri, 31 May 2024 05:38:01 +0000 (13:38 +0800)
committerzhouhao <haozhou.zhou@samsung.com>
Fri, 31 May 2024 05:38:01 +0000 (13:38 +0800)
Change-Id: I051a3f3da0ddfa185a042d0116c660e2a87ad4e5
Signed-off-by: zhouhao <haozhou.zhou@samsung.com>
mic/3rdparty/requests/packages/urllib3/util/connection.py
mic/3rdparty/urlgrabber/grabber.py

index 859aec6..8b2c725 100755 (executable)
@@ -85,7 +85,7 @@ def create_connection(address, timeout=socket._GLOBAL_DEFAULT_TIMEOUT,
                 sock = None
 
     if err is not None:
-        raise err
+        raise err # pylint: disable=raising-bad-type
     else:
         raise socket.error("getaddrinfo returns an empty list")
 
index d627249..e080b66 100755 (executable)
@@ -1165,13 +1165,13 @@ class URLGrabber(object):
 
             if (opts.retry is None) or (tries == opts.retry):
                 if DEBUG: DEBUG.info('retries exceeded, re-raising')
-                raise exception
+                raise exception # pylint: disable=raising-bad-type
 
             retrycode = getattr(exception, 'errno', None)
             if (retrycode is not None) and (retrycode not in opts.retrycodes):
                 if DEBUG: DEBUG.info('retrycode (%i) not in list %s, re-raising',
                                      retrycode, opts.retrycodes)
-                raise exception
+                raise exception # pylint: disable=raising-bad-type
             if retrycode is not None and retrycode < 0 and opts.retry_no_cache:
                 opts.no_cache = True
 
@@ -2561,7 +2561,7 @@ class _TH:
 #####################################################################
 #  TESTING
 def _main_test():
-    try: url, filename = sys.argv[1:3]
+    try: url, filename = sys.argv[1:3] # pylint: disable=unbalanced-tuple-unpacking
     except ValueError:
         print('usage:', sys.argv[0],
               '<url> <filename> [copy_local=0|1] [close_connection=0|1]')
@@ -2587,7 +2587,7 @@ def _main_test():
 
 
 def _retry_test():
-    try: url, filename = sys.argv[1:3]
+    try: url, filename = sys.argv[1:3] # pylint: disable=unbalanced-tuple-unpacking
     except ValueError:
         print('usage:', sys.argv[0],
               '<url> <filename> [copy_local=0|1] [close_connection=0|1]')