aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/test/resources/OpenPGP-Haskell
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2015-08-20 14:08:32 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2015-08-20 14:08:32 +0200
commit0d543a54af93f6e9bb370b6323b024e8224c2e1b (patch)
tree09983d276f41453d59228da93322b89e5a4c874c /OpenKeychain/src/test/resources/OpenPGP-Haskell
parent8b5ad658375a741bcdcdf2fcf262a2f0bfa6dbed (diff)
downloadopen-keychain-0d543a54af93f6e9bb370b6323b024e8224c2e1b.tar.gz
open-keychain-0d543a54af93f6e9bb370b6323b024e8224c2e1b.tar.bz2
open-keychain-0d543a54af93f6e9bb370b6323b024e8224c2e1b.zip
Revert "Fix pulling Serbian translation from Transifex"
This reverts commit 0438416ec2cdfb737aa60214142288eea61be76f.
Diffstat (limited to 'OpenKeychain/src/test/resources/OpenPGP-Haskell')
0 files changed, 0 insertions, 0 deletions
ont-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#============================================================================
# This library is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#============================================================================
# Copyright (c) 2006 XenSource Inc.
#============================================================================

import errno
import os
import os.path
import stat


def parents(dir, perms, enforcePermissions = False):
    """
    Ensure that the given directory exists, creating it if necessary, but not
    complaining if it's already there.
    
    @param dir The directory name.
    @param perms One of the stat.S_ constants.
    @param enforcePermissions Enforce our ownership and the given permissions,
    even if the directory pre-existed with different ones.
    """
    # Catch the exception here, rather than checking for the directory's
    # existence first, to avoid races.
    try:
        os.makedirs(dir, perms)
    except OSError, exn:
        if exn.args[0] != errno.EEXIST or not os.path.isdir(dir):
            raise
    if enforcePermissions:
        os.chown(dir, os.geteuid(), os.getegid())
        os.chmod(dir, stat.S_IRWXU)