Skip to content

Commit

Permalink
feat(log): log build os info and version
Browse files Browse the repository at this point in the history
  • Loading branch information
NewFuture committed Apr 20, 2019
1 parent 08bf8c9 commit d5b9ce9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions run.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
自动更新DNS
DDNS
@author: New Future
@modified: rufengsuixing
"""
Expand All @@ -17,9 +17,13 @@
from util import ip
from util.cache import Cache

# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate
__version__ = "python@none-build"

if getattr(sys, 'frozen', False):
os.environ['SSL_CERT_FILE'] = os.path.join(sys._MEIPASS, 'lib', 'cert.pem')
__version__ = "${BUILD_SOURCEBRANCHNAME}@${SYSTEM_PIPELINESTARTTIME}"
if os.name != 'nt':
# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate
os.environ['SSL_CERT_FILE'] = os.path.join(sys._MEIPASS, 'lib', 'cert.pem')

CACHE_FILE = os.path.join(tempfile.gettempdir(), 'ddns.cache')

Expand Down Expand Up @@ -137,6 +141,7 @@ def main():
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s <%(module)s.%(funcName)s> %(lineno)d@%(pathname)s \n[%(levelname)s] %(message)s')
logging.info("DDNS[%s] run: %s,%s", __version__, os.name, sys.platform)

proxy = get_config('proxy') or 'DIRECT'
proxy_list = proxy.strip('; ') .split(';')
Expand Down

0 comments on commit d5b9ce9

Please sign in to comment.