[game-data-packager] 01/01: only set GAME_PACKAGE_RELEASE at 'make install' time

Alexandre Detiste detiste-guest at moszumanska.debian.org
Thu Jul 28 09:39:08 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 303b8a6be36f64ac011c8fb196241528579cd5e4
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Thu Jul 28 11:36:42 2016 +0200

    only set GAME_PACKAGE_RELEASE at 'make install' time
    
    sys.argv is global !
    
    avoid filling http server logs with content of sys.argv[1]
    each time GDP is started in non-installed mode
---
 game_data_packager/version.py | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/game_data_packager/version.py b/game_data_packager/version.py
index 9c85a91..0cfef75 100644
--- a/game_data_packager/version.py
+++ b/game_data_packager/version.py
@@ -15,10 +15,7 @@ with open('debian/changelog', encoding='utf-8') as cl:
         cl = ChangeLog(cl, strict=False)
         GAME_PACKAGE_VERSION = str(cl.full_version)
 
-if len(sys.argv) > 1:
-    GAME_PACKAGE_RELEASE = sys.argv[1]
-else:
-    GAME_PACKAGE_RELEASE = ''
+GAME_PACKAGE_RELEASE = ''
 
 details = {}
 if os.path.isfile('/etc/os-release'):
@@ -54,6 +51,8 @@ else:
     exit('ERROR: Unknown distribution')
 
 if __name__ == '__main__':
+    if len(sys.argv) > 1:
+        GAME_PACKAGE_RELEASE = sys.argv[1]
     print('#!/usr/bin/python3')
     for const in ('GAME_PACKAGE_VERSION', 'GAME_PACKAGE_RELEASE', 'FORMAT', 'DISTRO'):
         print('%s = "%s"' % (const, eval(const)))

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