Skip to content

Commit

Permalink
Merge pull request #24 from alpacanetworks/23-installation-failure-on…
Browse files Browse the repository at this point in the history
…-ubuntu-2004

Fix the service manager to work on Python 3.8 or lower.
  • Loading branch information
eunyoung14 authored Aug 5, 2024
2 parents d0ad874 + 6a670ab commit 16f99a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion alpamon/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION = '1.3.0'
VERSION = '1.3.1'
4 changes: 2 additions & 2 deletions alpamon/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def get_resource_path(self, resource):
return resource_filename(__name__, resource)

def write_config(self):
with self.get_resource_path('config/%s.conf' % self.name).open('r') as f:
with open(self.get_resource_path('config/%s.conf' % self.name), 'r') as f:
template = f.read()

with open(self.conf_file, 'w') as f:
Expand All @@ -73,7 +73,7 @@ def write_service(self):
base_dir = '/usr/local'
exec_start = os.path.join(base_dir, 'bin', self.name)

with self.get_resource_path('config/%s.service' % self.name).open('r') as f:
with open(self.get_resource_path('config/%s.service' % self.name), 'r') as f:
template = f.read()

with open(self.svc_file, 'w') as f:
Expand Down

0 comments on commit 16f99a5

Please sign in to comment.