Skip to content

Commit

Permalink
v 0.2.7 (2016_01_17) : fixed a critical bug
Browse files Browse the repository at this point in the history
    o modified main() so that this function doesn't have any argument,
      allowing the setup.py to define a valid entry-point in the
      program. Added a warning in main() so that this error does not
      occur anymore.

    o 6 tests, pylint=10.0 for the three Python scripts
    o version packaged and sent to Pypi (https://pypi.python.org/pypi/Katal)
  • Loading branch information
suizokukan committed Jan 17, 2016
1 parent 128c65f commit a4aeeb5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,16 @@ The name Katal is derived from the Ancient Greek κατάλογος ("enrolment,

#(7) history / future versions

v 0.2.7 (2016_01_17) : fixed a critical bug

o modified main() so that this function doesn't have any argument,
allowing the setup.py to define a valid entry-point in the
program. Added a warning in main() so that this error does not
occur anymore.

o 6 tests, pylint=10.0 for the three Python scripts
o version packaged and sent to Pypi (https://pypi.python.org/pypi/Katal)

v 0.2.6 (2016_01_17) : reduced the number of global constants

o removed FULLNAME_DATABASE, TARGET_PATH,SOURCE_PATH, SOURCENAME_MAXLENGTH,
Expand Down
20 changes: 11 additions & 9 deletions katal/katal.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
import unicodedata

__projectname__ = "Katal"
__version__ = "0.2.7a" # see https://www.python.org/dev/peps/pep-0440/ e.g 0.1.2.dev1
__version__ = "0.2.7" # see https://www.python.org/dev/peps/pep-0440/ e.g 0.1.2.dev1
__author__ = "Xavier Faure (suizokukan)"
__copyright__ = "Copyright 2015, suizokukan"
__license__ = "GPL-3.0"
Expand Down Expand Up @@ -1834,35 +1834,37 @@ def logfile_opening():
return open(logfile_fullname, "a")

#///////////////////////////////////////////////////////////////////////////////
def main(_timestamp_start):
def main():
"""
main()
________________________________________________________________________
Main entry point.
________________________________________________________________________
PARAMETER :
o _timestamp_start : a datetime.datetime object
no PARAMETER, no RETURNED VALUE
no RETURNED VALUE
This function should NOT have arguments : otherwise, the entrypoint
defined in setup.py would not be valid.
o sys.exit(-1) is called if the config file is ill-formed.
o sys.exit(-2) is called if a KatalError exception is raised
o sys.exit(-3) is called if another exception is raised
"""
global ARGS

timestamp_start = datetime.now()

try:
ARGS = read_command_line_arguments()
check_args()

welcome(_timestamp_start)
main_warmup(_timestamp_start)
welcome(timestamp_start)
main_warmup(timestamp_start)
main_actions_tags()
main_actions()

goodbye(_timestamp_start)
goodbye(timestamp_start)

if USE_LOGFILE:
LOGFILE.close()
Expand Down Expand Up @@ -3170,4 +3172,4 @@ def welcome_in_logfile(_timestamp_start):
#/////////////////////////////// STARTING POINT ////////////////////////////////
#///////////////////////////////////////////////////////////////////////////////
if __name__ == '__main__':
main(_timestamp_start=datetime.now())
main()

0 comments on commit a4aeeb5

Please sign in to comment.