[PATCH 2/2] Create directories for stubs if they don't exist
Vratislav Podzimek
vpodzime at redhat.com
Tue Nov 19 11:54:05 UTC 2013
Also replace only python modules with stubs.
Signed-off-by: Vratislav Podzimek <vpodzime at redhat.com>
---
scripts/makeupdates | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/makeupdates b/scripts/makeupdates
index 89b5cdc..63955bc 100755
--- a/scripts/makeupdates
+++ b/scripts/makeupdates
@@ -220,9 +220,11 @@ def copyUpdatedFiles(tag, updates, cwd):
gitfile = fields[1]
if status == "D":
- if gitfile.startswith('pyanaconda/'):
+ if gitfile.startswith('pyanaconda/') and gitfile.endswith(".py"):
# deleted python module, write out a stub raising RemovedModuleError
file_path = os.path.join(tmpupdates, gitfile)
+ if not os.path.exists(os.path.dirname(file_path)):
+ os.makedirs(os.path.dirname(file_path))
with open(file_path, "w") as fobj:
fobj.write('from pyanaconda.errors import RemovedModuleError\n')
fobj.write('raise RemovedModuleError("This module no longer exists!")\n')
--
1.8.4.2
More information about the anaconda-patches
mailing list