Skip to content

Commit

Permalink
Merge pull request #283 from alessiosavi/patch-2
Browse files Browse the repository at this point in the history
Update parser.py
  • Loading branch information
mircealungu committed Dec 5, 2019
2 parents 41717fc + 248de77 commit 401e2d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask_monitoringdashboard/core/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ def parse_version(parser, header, version):
git_file = (open(os.path.join(git, 'HEAD')).read().rsplit(': ', 1)[1]).rstrip()
# read the git-version
version_file = os.path.join(git , git_file)
if os.path.exists(version):
version = open(version).read()
if os.path.exists(version_file):
version = open(version_file).read()
# cut version to at most 6 chars
return version[:6]
else:
Expand Down

0 comments on commit 401e2d5

Please sign in to comment.