summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhanno <hanno@ada9452e-eb2d-45b7-bbe6-05a4ab45a870>2017-11-17 19:55:19 +0000
committerhanno <hanno@ada9452e-eb2d-45b7-bbe6-05a4ab45a870>2017-11-17 19:55:19 +0000
commit0bd868ee636831093dd092080c1df6193da49432 (patch)
tree4caf636af1576167fc8b0add3ddb752b967ba36f
parent48b24a8762874900b3278b288d97af1de38abd82 (diff)
pycodestyle fixes
git-svn-id: https://svn.schokokeks.org/repos/freewvs@861 ada9452e-eb2d-45b7-bbe6-05a4ab45a870
-rwxr-xr-xfreewvs8
1 files changed, 4 insertions, 4 deletions
diff --git a/freewvs b/freewvs
index e4327b6..06a8998 100755
--- a/freewvs
+++ b/freewvs
@@ -57,7 +57,7 @@ def versioncompare(safe_version, find_version):
def vulnprint(appname, version, safeversion, vuln, vfilename, subdir,
style=None):
- appdir = '/'.join(os.path.abspath(vfilename).split('/')[:-1-subdir])
+ appdir = '/'.join(os.path.abspath(vfilename).split('/')[:-1 - subdir])
if not style:
print("%(appname)s %(version)s (%(safeversion)s) %(vuln)s "
"%(appdir)s" % vars())
@@ -113,7 +113,7 @@ config = configparser.ConfigParser()
try:
config.read(glob.glob('/usr/share/freewvs/*.freewvs'))
config.read(glob.glob('/usr/local/share/freewvs/*.freewvs'))
- config.read(glob.glob(os.path.dirname(sys.argv[0])+'/freewvsdb/*.freewvs'))
+ config.read(glob.glob(os.path.dirname(sys.argv[0]) + '/freewvsdb/*.freewvs'))
except configparser.MissingSectionHeaderError as err:
print("Error parsing config files: %s" % err)
@@ -170,7 +170,7 @@ for fdir in args:
mfile = os.path.join(root, filename)
try:
file = open(mfile)
- except:
+ except Exception:
continue
filestr = file.read()
file.close()
@@ -206,7 +206,7 @@ for fdir in args:
item['old_safe'].count(findversion) > 0:
if opts.ALL:
if opts.DEBUG:
- print("File "+mfile)
+ print("File " + mfile)
vulnprint(item['name'], findversion,
"ok", "", mfile, item['subdir'],
opts.OUTPUT)