Skip to content

Commit

Permalink
loadinc(): Do the same check of the environment that's done in
Browse files Browse the repository at this point in the history
loadmail() when deciding on the print format.
  • Loading branch information
warsaw committed Sep 11, 2002
1 parent 3b3b1ef commit abc502c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion regressiontests/loadmail.py
Expand Up @@ -213,7 +213,10 @@ def loadinc(name, mb, f, printstat=0, max=99999999, wait=1):
app=jar.root()['Application']
mdest=getattr(app, name)
if i%100 == 0 and printstat:
sys.stdout.write("\t%s\t%s\t\r" % (i, f.tell()))
fmt = "\t%s\t%s\t\r"
if os.environ.get('TERM') in ('dumb', 'emacs'):
fmt = "\t%s\t%s\t\n"
sys.stdout.write(fmt % (i, f.tell()))
sys.stdout.flush()

did=str(i)
Expand Down

0 comments on commit abc502c

Please sign in to comment.