Fix issues pointed out by Codacy
* Apparently Codacy doesn't like the standard try: import except: Python idiom, so handle that. * Fixed a missing paren on a debug line I added at the last minute and forgot to test with.
Austin S. Hemmelgarn committed
May 1, 2018 at 15:05 UTC
24d21360c202abd0e5acc9aabd2ffcd09cd8ef91
2 files changed
+2
-2
python.d/python_modules/bases/FrameworkServices/SocketService.py
+1
-1
@@ -6,7 +6,7 @@ import socket
6
7
try:
8
import ssl
9
-except:
9
+except ImportError:
10
_SSL_SUPPORT = False
11
else:
12
_SSL_SUPPORT = True
python.d/unbound.chart.py
+1
-1
@@ -101,7 +101,7 @@ class Service(SocketService):
101
self.definitions.update(EXTENDED_CHARTS)
102
self.request = 'UBCT1 stats\n'
103
self._parse_config()
104
- self.debug('Unbound config: {0}'.format(self.ubconf)
104
+ self.debug('Unbound config: {0}'.format(self.ubconf))
105
if os.access(self.ubconf, os.R_OK):
106
with open(self.ubconf, 'r') as ubconf:
107
try: