[game-data-packager] 01/01: do no fail hard on os.getlogin()

Alexandre Detiste detiste-guest at moszumanska.debian.org
Fri Jan 8 12:06:49 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 cebbda76f0eb17200f95b36e835565b7a4cc921d
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Fri Jan 8 13:06:23 2016 +0100

    do no fail hard on os.getlogin()
---
 game_data_packager/build.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/game_data_packager/build.py b/game_data_packager/build.py
index 32a6ced..6cf48df 100644
--- a/game_data_packager/build.py
+++ b/game_data_packager/build.py
@@ -1550,9 +1550,13 @@ class PackagingTask(object):
             spec.write('\n\n')
 
             spec.write('%changelog\n')
+            try:
+                login = os.getlogin()
+            except FileNotFoundError:
+                login = 'game-data-packager'
             spec.write('* %s %s@%s - %s-0\n' %
                         (time.strftime("%a %b %d %Y"),
-                         os.getlogin(), os.uname()[1], package.version))
+                         login, os.uname()[1], package.version))
             spec.write('- Package generated by game-data-packager'
                        ' for local use only\n')
 

-- 
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