Skip to content
Snippets Groups Projects
Commit 6b2e8649 authored by Daniel Brown's avatar Daniel Brown
Browse files

adding verbose flags

parent a439e44b
No related branches found
No related tags found
No related merge requests found
...@@ -344,8 +344,8 @@ class kat(object): ...@@ -344,8 +344,8 @@ class kat(object):
if not (os.path.isfile(kat_exec) and os.access(kat_exec, os.X_OK)): if not (os.path.isfile(kat_exec) and os.access(kat_exec, os.X_OK)):
raise MissingFinesse() raise MissingFinesse()
print "--------------------------------------------------------------" if self.verbose: print "--------------------------------------------------------------"
print "Running kat - Started at " + str(start) if self.verbose: print "Running kat - Started at " + str(start)
if hasattr(self, "x2axis"): if hasattr(self, "x2axis"):
r = katRun2D() r = katRun2D()
...@@ -382,7 +382,7 @@ class kat(object): ...@@ -382,7 +382,7 @@ class kat(object):
p=subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE) p=subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
err = "" err = ""
print "Finesse binary output:" if self.verbose: print "Finesse binary output:"
for line in iter(p.stderr.readline, ""): for line in iter(p.stderr.readline, ""):
#err += line #err += line
...@@ -426,7 +426,7 @@ class kat(object): ...@@ -426,7 +426,7 @@ class kat(object):
os.rename(outfile, newoutfile) os.rename(outfile, newoutfile)
print "\nOutput data saved to '{0}'".format(newoutfile) if self.verbose: print "\nOutput data saved to '{0}'".format(newoutfile)
if hasattr(self, "x2axis"): if hasattr(self, "x2axis"):
[r.x,r.y,r.z,hdr] = self.readOutFile(outfile) [r.x,r.y,r.z,hdr] = self.readOutFile(outfile)
...@@ -452,7 +452,7 @@ class kat(object): ...@@ -452,7 +452,7 @@ class kat(object):
os.rename(katfile.name, newkatfile) os.rename(katfile.name, newkatfile)
print "Kat file saved to '{0}'".format(newkatfile) if self.verbose: print "Kat file saved to '{0}'".format(newkatfile)
katfile.close() katfile.close()
...@@ -472,8 +472,8 @@ class kat(object): ...@@ -472,8 +472,8 @@ class kat(object):
except pkex.FinesseRunError as fe: except pkex.FinesseRunError as fe:
print fe print fe
finally: finally:
print "" if self.verbose: print ""
print "Finished in " + str(datetime.datetime.now()-start) if self.verbose: print "Finished in " + str(datetime.datetime.now()-start)
def add(self, obj): def add(self, obj):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment