From a08e80472bf095bbe90ca98a31fed1fea03e5283 Mon Sep 17 00:00:00 2001 From: "Dr. Peter Poeml" Date: Fri, 14 Jul 2006 18:23:20 +0000 Subject: [PATCH] handle error if packagecachedir is not writable by user --- osc/fetch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osc/fetch.py b/osc/fetch.py index e74ba781..6cad4869 100644 --- a/osc/fetch.py +++ b/osc/fetch.py @@ -85,7 +85,12 @@ class Fetcher: def dirSetup(self, pac): dir = os.path.join(self.cachedir, pac.localdir) if not os.path.exists(dir): - os.makedirs(dir, mode=0755) + try: + os.makedirs(dir, mode=0755) + except OSError, e: + print 'packagecachedir is not writable for you?' + print e + sys.exit(1) def run(self, buildinfo):