Browse Source

Cleanup

pull/53/head
Wesley Kerfoot 6 years ago
parent
commit
07cc35ce50
  1. 6
      deletefb/tools/archive.py
  2. 4
      deletefb/tools/common.py
  3. 1
      deletefb/tools/likes.py

6
deletefb/tools/archive.py

@ -37,7 +37,11 @@ class Archive:
@contextmanager @contextmanager
def archiver(archive_type): def archiver(archive_type):
archive_file = open("./%s.log" % archive_type, mode="ta", buffering=1) archive_file = open(
"./{0}.log".format(archive_type),
mode="ta",
buffering=1
)
archiver_instance = Archive( archiver_instance = Archive(
archive_type=archive_type, archive_type=archive_type,

4
deletefb/tools/common.py

@ -36,8 +36,7 @@ def logger(name):
""" """
# Make sure the path always points to the correct directory # Make sure the path always points to the correct directory
config_path = os.path.dirname( config_path = os.path.dirname(os.path.realpath(__file__)) + "/../logging_conf.json"
os.path.realpath(__file__)) + "/../logging_conf.json"
if not isfile(config_path): # called from file (deletefb.py) if not isfile(config_path): # called from file (deletefb.py)
os.chdir("..") os.chdir("..")
@ -46,7 +45,6 @@ def logger(name):
logging.config.dictConfig(config["logging"]) logging.config.dictConfig(config["logging"])
return logging.getLogger(name) return logging.getLogger(name)
NO_CHROME_DRIVER = """ NO_CHROME_DRIVER = """
You need to install the chromedriver for Selenium\n You need to install the chromedriver for Selenium\n
Please see this link https://github.com/weskerfoot/DeleteFB#how-to-use-it\n Please see this link https://github.com/weskerfoot/DeleteFB#how-to-use-it\n

1
deletefb/tools/likes.py

@ -112,4 +112,3 @@ def unlike_pages(driver, profile_url):
except SELENIUM_EXCEPTIONS: except SELENIUM_EXCEPTIONS:
# We're done # We're done
break break

Loading…
Cancel
Save