adulau/cve-search

db_updater.py fails for pathes with whitespace

hashworks opened this issue · 1 comments

Running ./sbin/db_updater.py in a path like /path/with/whitespace here/ fails:

$ ./sbin/db_updater.py -c
./sbin/db_updater.py:105: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if not Configuration.includesFeed(source['name']) and source['name'] is not "redis-cache-cpe":
./sbin/db_updater.py:107: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if args.f and source['name'] is not "redis-cache-cpe":
./sbin/db_updater.py:111: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if source['name'] is "cpeother":
./sbin/db_updater.py:114: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if source['name'] is not "redis-cache-cpe":
./sbin/db_updater.py:117: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if args.f and source['name'] is "cpe":
./sbin/db_updater.py:120: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif args.f and source['name'] is "cve":
./sbin/db_updater.py:129: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif (args.c is True and source['name'] is "redis-cache-cpe"):
INFO:root:Starting cpe
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:cpe has 307341 elements (0 update)
INFO:root:Starting cve
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:cve has 144323 elements (0 update)
INFO:root:Starting cwe
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:cwe has 0 elements (0 update)
INFO:root:Starting capec
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:capec has 0 elements (0 update)
INFO:root:Starting redis-cache-cpe
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:redis-cache-cpe updated
INFO:root:Starting via4
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:via4 has 0 elements (0 update)
INFO:root:Starting ensureindex
/usr/bin/python3: can't open file '/path/with/whitespace': [Errno 2] No such file or directory
INFO:root:
[-] No plugin loader file!

Stale issue message