diff options
author | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-01-26 14:44:50 +0000 |
---|---|---|
committer | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-01-26 14:44:50 +0000 |
commit | 22460bf9befb2bd6fe6765d86556f2267a641121 (patch) | |
tree | 552c81c532a320094efeecc3971cdcd1f7aeb75a /src/lib | |
parent | 0f7853642d1c3648f41ea818d87ce527114f02c8 (diff) | |
download | sos-22460bf9befb2bd6fe6765d86556f2267a641121.tar.gz |
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
Diffstat (limited to 'src/lib')
-rwxr-xr-x | src/lib/sos/policyredhat.py | 11 |
1 files changed, 8 insertions, 3 deletions
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") |