Skip to content

Commit

Permalink
Fix valid module
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelly Choi authored and Jelly Choi committed Dec 5, 2017
1 parent 5e715ab commit 8aff095
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 31 deletions.
51 changes: 25 additions & 26 deletions pingdumb/pingdumb.py → pingdumb.py
@@ -1,26 +1,25 @@
import sys

from pingdumb.conf import read_config, set_config, \
write_config, extract_password_with_argv
from pingdumb.main_module import checker
from pingdumb.smtp_module import smtp_login_with_conf_test


def main(argv):

if len(sys.argv) == 1:
conf = set_config()
s_pw = conf["smtpPw"]
write_config(conf)
else:
"""if exist argv, set password and execute with default configure"""
s_pw = extract_password_with_argv(argv)
conf = read_config()

conf["smtpPw"] = s_pw
smtp_login_with_conf_test(conf)

checker(conf)

if __name__ == "__main__":
main(sys.argv[1:])
import sys

from pingdumb.conf import read_config, set_config, \
write_config, extract_password_with_argv
from pingdumb.main_module import checker
from pingdumb.smtp_module import smtp_login_with_conf_test


def main(argv):
if len(sys.argv) == 1:
conf = set_config()
s_pw = conf["smtpPw"]
write_config(conf)
else:
"""if exist argv, set password and execute with default configure"""
s_pw = extract_password_with_argv(argv)
conf = read_config()

conf["smtpPw"] = s_pw
smtp_login_with_conf_test(conf)

checker(conf)

if __name__ == "__main__":
main(sys.argv[1:])
1 change: 0 additions & 1 deletion pingdumb/conf.py
@@ -1,7 +1,6 @@
import getpass
import json
import getopt
from builtins import input
from genericpath import isfile
from os.path import sep

Expand Down
2 changes: 1 addition & 1 deletion pingdumb/main_module.py
@@ -1,6 +1,6 @@
import datetime
import time
from future.moves.urllib.request import urlopen
from urllib.request import urlopen


from pingdumb.smtp_module import form_msg, send_status_mail
Expand Down
8 changes: 5 additions & 3 deletions setup.py
Expand Up @@ -4,12 +4,14 @@
setup(
name = 'pingdumb',
packages = ['pingdumb'],
version = '0.1.4',
version = '0.1.5',
description = 'Check http status on console',
author = 'Hyeon-Mook Jerry Choi',
author_email = 'chm073@gmail.com',
url = 'https://github.com/kyunooh/pingdumb',
download_url = 'https://github.com/kyunooh/pingdumb/tarball/0.1.4',
keywords = ['testing', 'loggin', 'example'],
download_url = 'https://github.com/kyunooh/pingdumb/tarball/0.1.5',
keywords = ['testing', 'login', 'example'],
python_require = '>=3',
zip_safe = False,
classifiers = []
)

0 comments on commit 8aff095

Please sign in to comment.