git » abk » commit 8b6b506

Ignore some os.makedirs() errors.

author
2005-03-02 04:55:58 UTC
committer
2005-03-02 04:55:58 UTC
parent 1291d50aee217fc04d2db9e903950142ca05259d

Ignore some os.makedirs() errors.

abk +5 -1

diff --git a/abk b/abk
index daa6799..5d5c165 100644
--- a/abk
+++ b/abk
@@ -144,7 +144,11 @@ class file_info:
 		elif self.type == 'd':
 			# we just create directories
 			#os.mkdir(dst, self.type & 07777)
-			os.makedirs(dst, self.mode & 07777)
+			try:
+				os.makedirs(dst, self.mode & 07777)
+			except OSError:
+				# ignore if the dir. already exists
+				pass
 		else:
 			raise 'Unk type: 0x%x %d' % (self.mode, self.name)