Fix some errors and create folder for module
This commit is contained in:
parent
1df842ac4a
commit
b518f6986a
4 changed files with 7 additions and 6 deletions
|
@ -86,7 +86,8 @@ destination_path="${DEPLOYMENT_PATH}/${PROJECT_CODENAME}"
|
|||
mkdir -p "${DEPLOYMENT_PATH}"
|
||||
script_path=$(dirname "${0}")
|
||||
cp "${script_path}/skeleton" "${destination_path}" -rfp
|
||||
mv "${destination_path}/project_codename.py" "${destination_path}/${PROJECT_CODENAME}.py"
|
||||
mv "${destination_path}/project_codename" "${destination_path}/${PROJECT_CODENAME}"
|
||||
mv "${destination_path}/${PROJECT_CODENAME}/project_codename.py" "${destination_path}/${PROJECT_CODENAME}/${PROJECT_CODENAME}.py"
|
||||
while read -r file
|
||||
do
|
||||
sed -i "s/__project_codename__/${PROJECT_CODENAME}/g" "${file}"
|
||||
|
|
|
@ -14,7 +14,7 @@ from logging.handlers import SysLogHandler
|
|||
|
||||
class __project_codename__:
|
||||
|
||||
def _init_(self, debug_level, log_file):
|
||||
def __init__(self, debug_level, log_file):
|
||||
''' Initial function called when object is created '''
|
||||
self.config = dict()
|
||||
self.config['debug_level'] = debug_level
|
||||
|
@ -44,7 +44,7 @@ class __project_codename__:
|
|||
log_file = os.path.join(log_folder, "__project_codename__.log")
|
||||
|
||||
if not os.path.exists(os.path.dirname(log_file)):
|
||||
os.path.mkdir(os.path.dirname(log_file))
|
||||
os.mkdir(os.path.dirname(log_file))
|
||||
|
||||
filehandler = logging.handlers.RotatingFileHandler(log_file, maxBytes=102400000)
|
||||
# create formatter
|
|
@ -1,9 +1,9 @@
|
|||
[metadata]
|
||||
name = %project_codename%
|
||||
version = %version%
|
||||
name = __project_codename__
|
||||
version = __version__
|
||||
|
||||
[options]
|
||||
packages = %project_codename%
|
||||
packages = __project_codename__
|
||||
install_requires =
|
||||
requests
|
||||
importlib; python_version == "3.6"
|
||||
|
|
Loading…
Reference in a new issue