From b20bdca7bbbb97254d6da2d343fce20516417318 Mon Sep 17 00:00:00 2001 From: lxnay Date: Sun, 30 Mar 2008 22:05:46 +0000 Subject: [PATCH] create unpack dir and work dir if not found git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@1543 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- libraries/entropyConstants.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libraries/entropyConstants.py b/libraries/entropyConstants.py index 46c1298df..250cba5d9 100644 --- a/libraries/entropyConstants.py +++ b/libraries/entropyConstants.py @@ -1087,14 +1087,16 @@ def const_createWorkingDirectories(): ''' w_gid = os.stat(etpConst['entropyworkdir'])[5] if w_gid != gid: - if not os.path.isdir(etpConst['entropyworkdir']): - os.makedirs(etpConst['entropyworkdir']) const_setup_perms(etpConst['entropyworkdir'],gid) w_gid = os.stat(etpConst['entropyunpackdir'])[5] if w_gid != gid: if not os.path.isdir(etpConst['entropyunpackdir']): - os.makedirs(etpConst['entropyunpackdir']) - const_setup_perms(etpConst['entropyunpackdir'],gid) + try: + os.makedirs(etpConst['entropyunpackdir']) + except OSError: + pass + if os.path.isdir(etpConst['entropyunpackdir']): + const_setup_perms(etpConst['entropyunpackdir'],gid) # always setup /var/lib/entropy/client permissions const_setup_perms(etpConst['etpdatabaseclientdir'],gid)