summaryrefslogtreecommitdiffstats
path: root/base/common/python/pki/util.py
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2014-05-27 14:12:38 -0400
committerAde Lee <alee@redhat.com>2014-05-29 11:29:44 -0400
commit6262dc33b72ea5703959b91dd95f13d732a5d391 (patch)
tree738b751867665b68288629745dcd33c9971b73d6 /base/common/python/pki/util.py
parenta353e5f81341830ea8a151e88ffc2be35aa40451 (diff)
downloadpki-6262dc33b72ea5703959b91dd95f13d732a5d391.tar.gz
pki-6262dc33b72ea5703959b91dd95f13d732a5d391.tar.xz
pki-6262dc33b72ea5703959b91dd95f13d732a5d391.zip
formatting fixes in python client code for pycharm
Diffstat (limited to 'base/common/python/pki/util.py')
-rw-r--r--base/common/python/pki/util.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/common/python/pki/util.py b/base/common/python/pki/util.py
index a64f174f4..19f6be720 100644
--- a/base/common/python/pki/util.py
+++ b/base/common/python/pki/util.py
@@ -18,12 +18,15 @@
# Copyright (C) 2013 Red Hat, Inc.
# All rights reserved.
#
-''' Module containing utility functions and classes for the Dogtag python code '''
+"""
+Module containing utility functions and classes for the Dogtag python code
+"""
import os
import shutil
+
def copy(source, dest):
"""
Copy a file or a folder and its contents.
@@ -58,6 +61,7 @@ def copy(source, dest):
targetfile = os.path.join(destpath, filename)
copyfile(sourcefile, targetfile)
+
def copyfile(source, dest, overwrite=True):
"""
Copy a file or link while preserving its attributes.
@@ -82,6 +86,7 @@ def copyfile(source, dest, overwrite=True):
os.chmod(dest, stat.st_mode)
os.chown(dest, stat.st_uid, stat.st_gid)
+
def copydirs(source, dest):
"""
Copy a folder and its parents while preserving their attributes.
@@ -103,6 +108,7 @@ def copydirs(source, dest):
os.chmod(dest, stat.st_mode)
os.chown(dest, stat.st_uid, stat.st_gid)
+
def chown(path, uid, gid):
"""
Change ownership of a folder and its contents.