Browse code

pycodestyle fixes

Hanno Böck authored on17/11/2017 20:55:19
Showing1 changed files
... ...
@@ -57,7 +57,7 @@ def versioncompare(safe_version, find_version):
57 57
 
58 58
 def vulnprint(appname, version, safeversion, vuln, vfilename, subdir,
59 59
               style=None):
60
-    appdir = '/'.join(os.path.abspath(vfilename).split('/')[:-1-subdir])
60
+    appdir = '/'.join(os.path.abspath(vfilename).split('/')[:-1 - subdir])
61 61
     if not style:
62 62
         print("%(appname)s %(version)s (%(safeversion)s) %(vuln)s "
63 63
               "%(appdir)s" % vars())
... ...
@@ -113,7 +113,7 @@ config = configparser.ConfigParser()
113 113
 try:
114 114
     config.read(glob.glob('/usr/share/freewvs/*.freewvs'))
115 115
     config.read(glob.glob('/usr/local/share/freewvs/*.freewvs'))
116
-    config.read(glob.glob(os.path.dirname(sys.argv[0])+'/freewvsdb/*.freewvs'))
116
+    config.read(glob.glob(os.path.dirname(sys.argv[0]) + '/freewvsdb/*.freewvs'))
117 117
 except configparser.MissingSectionHeaderError as err:
118 118
     print("Error parsing config files: %s" % err)
119 119
 
... ...
@@ -170,7 +170,7 @@ for fdir in args:
170 170
                     mfile = os.path.join(root, filename)
171 171
                     try:
172 172
                         file = open(mfile)
173
-                    except:
173
+                    except Exception:
174 174
                         continue
175 175
                     filestr = file.read()
176 176
                     file.close()
... ...
@@ -206,7 +206,7 @@ for fdir in args:
206 206
                                 item['old_safe'].count(findversion) > 0:
207 207
                             if opts.ALL:
208 208
                                 if opts.DEBUG:
209
-                                    print("File "+mfile)
209
+                                    print("File " + mfile)
210 210
                                 vulnprint(item['name'], findversion,
211 211
                                           "ok", "", mfile, item['subdir'],
212 212
                                           opts.OUTPUT)