Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.
/ pulp Public archive

Commit

Permalink
Revert mkdir() changes for Bundle and Lock.
Browse files Browse the repository at this point in the history
fixes #7803
  • Loading branch information
ggainey authored and ipanova committed Nov 9, 2020
1 parent f68ad49 commit 09fa329
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/pulp/common/bundle.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
import re
from logging import getLogger
from pulp.plugins.util import misc

from M2Crypto import X509

Expand Down Expand Up @@ -200,7 +199,8 @@ def mkdir(self):
Ensure I{root} directory exists.
"""
path = os.path.dirname(self.path)
misc.mkdir(path)
if not os.path.exists(path):
os.makedirs(path)

def cn(self):
"""
Expand Down
5 changes: 2 additions & 3 deletions common/pulp/common/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

from threading import RLock

from pulp.plugins.util import misc


class LockFailed(Exception):
pass
Expand Down Expand Up @@ -94,7 +92,8 @@ def setpid(self, pid=os.getpid()):

def __mkdir(self, path):
dir = os.path.dirname(path)
misc.mkdir(dir)
if not os.path.exists(dir):
os.makedirs(dir)


class Lock:
Expand Down

0 comments on commit 09fa329

Please sign in to comment.