From a49270fc5890c9c4386176404a4b700c9cbde083 Mon Sep 17 00:00:00 2001 From: Torsten Werner Date: Sat, 26 Mar 2011 17:08:21 +0000 Subject: [PATCH] Add missing directories in filewriter.py. Signed-off-by: Torsten Werner --- daklib/filewriter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/daklib/filewriter.py b/daklib/filewriter.py index a3c16ea8..8907fa6d 100755 --- a/daklib/filewriter.py +++ b/daklib/filewriter.py @@ -54,6 +54,11 @@ class BaseFileWriter(object): ''' Returns a file object for writing. ''' + # create missing directories + try: + os.makedirs(os.path.dirname(self.path)) + except: + pass self.file = open(self.path + '.new', 'w') return self.file -- 2.39.5