Skip to content
Permalink
Browse files

remove unused imports. cleanup.

  • Loading branch information
stnbu committed Sep 1, 2018
1 parent 4e8db7c commit 8217662bc910a06db32a1b2ac0b33bf4699fba25
Showing with 3 additions and 10 deletions.
  1. +3 −10 daemon/base.py
@@ -1,20 +1,16 @@
# -*- mode: python; coding: utf-8 -*-
"""Fetch GitHub data via the GitHub API, write it to a local database (sqlite3). Features daemonization.
"""

import os
import sys
import sys
import time
import tempfile
import re
import requests
import datetime
import pytz
import json
import urllib
from requests.auth import HTTPBasicAuth
import logging
import logging.handlers
import lockfile
from dateutil.parser import parse as parse_dt

import daemon
@@ -127,7 +123,7 @@ def exception_handler(type_, value, tb):
))
sys.__excepthook__(type_, value, tb)
sys.excepthook = exception_handler
# ...and log to a file (syslog difficulties. tbd...)

fh = logging.FileHandler(os.path.join(self.dir_path, 'gitbored-daemon.log'))
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
@@ -195,6 +191,3 @@ def main():
logger.debug('not daemonizing')
gf = GithubFeed(dir_path, api_auth)
gf.worker()

if __name__ == '__main__':
main()

0 comments on commit 8217662

Please sign in to comment.