From 22460bf9befb2bd6fe6765d86556f2267a641121 Mon Sep 17 00:00:00 2001 From: shnavid Date: Fri, 26 Jan 2007 14:44:50 +0000 Subject: Keep asking full name until one is given to prevent errors when moving the sos tree before packaging. Reformat tar file name is no ticket number is given. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@67 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/lib/sos/policyredhat.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/lib/sos/policyredhat.py b/src/lib/sos/policyredhat.py index 791a6409..87addf89 100755 --- a/src/lib/sos/policyredhat.py +++ b/src/lib/sos/policyredhat.py @@ -76,14 +76,19 @@ class SosPolicy: def packageResults(self): print "Packaging reults to send to support . . ." - print "Please enter your first initial and last name (jsmith): ", - name = sys.stdin.readline()[:-1] + name="" + while len(name)==0: + print "Please enter your first initial and last name (jsmith): ", + name = sys.stdin.readline()[:-1] print "Please enter the case number that you are generating this", print "report for: ", ticketNumber = sys.stdin.readline()[:-1] - namestr = name + "." + ticketNumber + if len(ticketNumber): + namestr = name + "." + ticketNumber + else: + namestr = name ourtempdir = gettempdir() tarballName = os.path.join(ourtempdir, namestr + ".tar.bz2") -- cgit