Commits

Anonymous committed a430c31

Forcing progressbar not to draw if cannot attach to terminal (i.e. used over wire with fabrics)

  • Participants
  • Parent commits ab076fb

Comments (0)

Files changed (1)

File richtemplates/management/helpers.py

 
     os.makedirs(dst)
     errors = []
-    pbar = ProgressBar(color='GREEN', width=40)
+    try:
+        pbar = ProgressBar(color='GREEN', width=40)
+    except:
+        pbar = None
+        draw_pbar = False
     total = len(names)
 
     for i in xrange(total):