FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 12-21-2011, 12:51 AM
"Brian C. Lane"
 
Default lorax: check for output directory early and quit

From: "Brian C. Lane" <bcl@redhat.com>

---
src/sbin/lorax | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/sbin/lorax b/src/sbin/lorax
index 06bc019..8d73ac6 100755
--- a/src/sbin/lorax
+++ b/src/sbin/lorax
@@ -93,6 +93,9 @@ def main(args):
or not opts.source or not outputdir:
parser.error("missing one or more required arguments")

+ if os.path.exists(outputdir):
+ parser.error("output directory should not exist.")
+
# create the temporary directory for lorax
tempdir = tempfile.mkdtemp(prefix="lorax.", dir=tempfile.gettempdir())

--
1.7.6.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:22 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org