Skip to content

Commit

Permalink
V1.19.02
Browse files Browse the repository at this point in the history
  • Loading branch information
jgyates committed Feb 15, 2024
1 parent 6a404c0 commit 65078dd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 13 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file.
- Minor error handling update in Fuel Logger thread
- Minor update to controller detection for custom controller models
- Update for 26kw Evo2 air cooled model
- Update to genmonmaint.sh for managed python environments
- update for paho-mqtt version change

## V1.19.01 -2023-12-06
- Update to genmonmaint.sh to ask about serial connection type on install (thanks @skipfire)
Expand Down
26 changes: 15 additions & 11 deletions genmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,18 +191,22 @@ def __init__(self, ConfigFilePath=ProgramDefaults.ConfPath):
self.InterfaceServerThread, Name="InterfaceServerThread"
)

# init mail, start processing incoming email
self.mail = MyMail(
monitor=True,
incoming_folder=self.IncomingEmailFolder,
processed_folder=self.ProcessedEmailFolder,
incoming_callback=self.ProcessCommand,
loglocation=self.LogLocation,
ConfigFilePath=ConfigFilePath,
)
try:
# init mail, start processing incoming email
self.mail = MyMail(
monitor=True,
incoming_folder=self.IncomingEmailFolder,
processed_folder=self.ProcessedEmailFolder,
incoming_callback=self.ProcessCommand,
loglocation=self.LogLocation,
ConfigFilePath=ConfigFilePath,
)

self.Threads = self.MergeDicts(self.Threads, self.mail.Threads)
self.MailInit = True
self.Threads = self.MergeDicts(self.Threads, self.mail.Threads)
self.MailInit = True
except Exception as e1:
self.LogErrorLine("Error loading mail support: " + str(e1))
sys.exit(1)

self.FeedbackPipe = MyPipe(
"Feedback",
Expand Down
3 changes: 2 additions & 1 deletion genmonlib/mymail.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def __init__(
self.log = SetupLogger("mymail", self.logfile)
else:
self.log = log
self.console = None

# if mymail.conf is present attempt to copy it from the
# main source directory
Expand All @@ -92,7 +93,7 @@ def __init__(
copyfile(os.path.join(self.ModulePath, "mymail.conf"), self.configfile)
else:
self.LogError("Missing config file : " + self.configfile)
sys.exit(1)
self.FatalError("Missing config file : " + self.configfile)

self.config = MyConfig(filename=self.configfile, section="MyMail", log=self.log)

Expand Down
3 changes: 2 additions & 1 deletion genmonmaint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ function installrpirtscts() {
# This function will install the required libraries for genmon
function installgenmon() {

checkmanagedpackages
echo "Installing genmon package requirements...."
# possibly use "sudo easy_install3 -U pip"
sudo apt-get -yqq update
Expand Down Expand Up @@ -450,6 +449,8 @@ if [ "$update_os" = true ] ; then
sudo apt-get --allow-releaseinfo-change update && sudo apt-get upgrade
fi

checkmanagedpackages

if [ "$install_opt" = true ] ; then
if [ "$noprompt_opt" = true ] ; then
installgenmon "noprompt"
Expand Down

0 comments on commit 65078dd

Please sign in to comment.