Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates-src > by-pkgid > 0f789f5d9b93bf583deb1f0776dc39b5 > files > 12

hplip-3.14.6-8.1.mga5.src.rpm

diff -up hplip-3.14.6/base/os_utils.py.umask hplip-3.14.6/base/os_utils.py
--- hplip-3.14.6/base/os_utils.py.umask	2014-06-03 08:33:10.000000000 +0200
+++ hplip-3.14.6/base/os_utils.py	2014-11-21 18:44:05.021677713 +0100
@@ -53,14 +53,15 @@ def getHPLIPDir():
     status = 0
 
     if not os.path.exists(hplipdir):
+        old_umask = os.umask(0)
         try:
-            os.umask(0)
             s = os.stat(homedir)
             os.mkdir(hplipdir, 0755)
             os.chown(hplipdir, s[stat.ST_UID], s[stat.ST_GID])
         except OSError:
             status = 1
             log.error("Failed to create %s" % hplipdir)
+        os.umask(old_umask)
 
     return status, hplipdir