raise, don't print
authorSeth Vidal <skvidal@fedoraproject.org>
Wed, 13 Feb 2008 20:48:52 +0000 (15:48 -0500)
committerSeth Vidal <skvidal@fedoraproject.org>
Wed, 13 Feb 2008 20:48:52 +0000 (15:48 -0500)
createrepo/__init__.py

index 9ae92723865792ab08a32c237646fa50a70e7622..a2719db9ff440d2904a21bc7e6bd207331dc3048 100644 (file)
@@ -196,8 +196,8 @@ class MetaDataGenerator:
             if not os.path.isabs(a):
                 a = os.path.join(self.conf.outputdir ,a)
             if not checkAndMakeDir(a):
-                errorprint(_('Error: cannot open/write to cache dir %s' % a))
-                parser.print_usage()
+                raise MDError, _('Error: cannot open/write to cache dir %s' % a)
+
             self.conf.cachedir = a