From 2964d9e947131d1c0fcc07f6ac772fe0f6724e8c Mon Sep 17 00:00:00 2001 From: Pablo O Vieira Date: Mon, 11 Apr 2016 20:02:47 -0300 Subject: [PATCH] entry point bug fix --- CHANGELOG.rst | 5 +++++ noipy/__init__.py | 2 +- noipy/main.py | 14 +++++++------- test/test_noipy.py | 5 ++--- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7ac52a9..1a4f78a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,6 +3,11 @@ Changelog ========= +1.4.4 (2016-04-11) +------------------ + +- Bugfix + 1.4.3 (2015-10-15) ------------------ diff --git a/noipy/__init__.py b/noipy/__init__.py index d85c1c5..ac066a6 100644 --- a/noipy/__init__.py +++ b/noipy/__init__.py @@ -9,7 +9,7 @@ """ __title__ = "noipy" -__version_info__ = ('1', '4', '3') +__version_info__ = ('1', '4', '4') __version__ = ".".join(__version_info__) __author__ = "Pablo O Vieira" __email__ = "noipy@povieira.com" diff --git a/noipy/main.py b/noipy/main.py index 5e684de..285325a 100644 --- a/noipy/main.py +++ b/noipy/main.py @@ -15,9 +15,9 @@ from noipy import utils -from . import dnsupdater -from . import authinfo -from . import __version__ +from noipy import dnsupdater +from noipy import authinfo +from noipy import __version__ EXECUTION_RESULT_OK = 0 @@ -165,12 +165,12 @@ def main(): parser = create_parser() args = parser.parse_args() - result, status_message = execute_update(args) - print(status_message) - if result != EXECUTION_RESULT_OK: + result = execute_update(args) + print(result.get('process_message')) + if result.get('exec_result') != EXECUTION_RESULT_OK: parser.format_usage() - sys.exit(result) + sys.exit(result.get('exec_result')) if __name__ == '__main__': main() diff --git a/test/test_noipy.py b/test/test_noipy.py index 63155e1..284dc70 100644 --- a/test/test_noipy.py +++ b/test/test_noipy.py @@ -5,18 +5,17 @@ # Copyright (c) 2013 Pablo O Vieira (povieira) # See README.rst and LICENSE for details. -import unittest +import getpass import os import re import shutil -import getpass +import unittest from noipy import authinfo from noipy import dnsupdater from noipy import main from noipy import utils - VALID_IP_REGEX = r"^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25" \ r"[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4]" \ r"[0-9]|25[0-5])$"