~ubuntu-branches/ubuntu/saucy/hplip/saucy-proposed

« back to all changes in this revision

Viewing changes to base/g.py

  • Committer: Package Import Robot
  • Author(s): Mark Purcell
  • Date: 2012-05-26 11:20:39 UTC
  • mfrom: (1.5.6) (31.1.3 precise)
  • Revision ID: package-import@ubuntu.com-20120526112039-bevxczegxnbyr5m7
Tags: 3.12.4-1
* New upstream release
* Switch to source/format 3.0 (quilt) - drop dpatch
* Refreshed debian/patches
* dh_autoreconf debian/autogen.sh & set local-options single-debian-patch
* Update to debian/compat -> 9
* Fix "hardened build flags" patch from Moritz - thanks (Closes: #667828)
* Fix "duplex descriptor uninitialized" patch from Matej (Closes: #583273)
* Fix "please migrate to kde-runtime" patch from Pino (Closes: #666544)

Show diffs side-by-side

added added

removed removed

Lines of Context:
268
268
# Spinner, ala Gentoo Portage
269
269
spinner = "\|/-\|/-"
270
270
spinpos = 0
 
271
enable_spinner = True
 
272
 
 
273
def change_spinner_state(enable =True):
 
274
    global enable_spinner
 
275
    enable_spinner = enable
271
276
 
272
277
def update_spinner():
273
 
    global spinner, spinpos
274
 
    if not log.is_debug() and sys.stdout.isatty():
 
278
    global spinner, spinpos, enable_spinner
 
279
    if enable_spinner and not log.is_debug() and sys.stdout.isatty():
275
280
        sys.stdout.write("\b" + spinner[spinpos])
276
281
        spinpos=(spinpos + 1) % 8
277
282
        sys.stdout.flush()
278
283
 
279
284
def cleanup_spinner():
280
 
    if not log.is_debug() and sys.stdout.isatty():
 
285
    global enable_spinner
 
286
    if enable_spinner and not log.is_debug() and sys.stdout.isatty():
281
287
        sys.stdout.write("\b \b")
282
288
        sys.stdout.flush()
283
289