[game-data-packager] 01/01: parse /etc/os-release in a more robust way, fix for Arch
Alexandre Detiste
detiste-guest at moszumanska.debian.org
Mon Mar 28 08:46:14 UTC 2016
This is an automated email from the git hooks/post-receive script.
detiste-guest pushed a commit to branch master
in repository game-data-packager.
commit 9885b82cd7ae9608b1d34e4a256730da3f13a037
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Mon Mar 28 10:44:48 2016 +0200
parse /etc/os-release in a more robust way, fix for Arch
---
game_data_packager/version.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/game_data_packager/version.py b/game_data_packager/version.py
index 107a3cf..4f2e519 100644
--- a/game_data_packager/version.py
+++ b/game_data_packager/version.py
@@ -18,6 +18,8 @@ details = {}
if os.path.isfile('/etc/os-release'):
with open('/etc/os-release', encoding='utf-8') as release:
for line in release:
+ if '=' not in line:
+ continue
key, value = line.strip().split('=', 1)
details[key]=value.strip('"')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list