equal
deleted
inserted
replaced
520 if command fails and onerr is None, return status. if ui object, |
520 if command fails and onerr is None, return status. if ui object, |
521 print error message and return status, else raise onerr object as |
521 print error message and return status, else raise onerr object as |
522 exception.''' |
522 exception.''' |
523 def py2shell(val): |
523 def py2shell(val): |
524 'convert python object into string that is useful to shell' |
524 'convert python object into string that is useful to shell' |
525 if val in (None, False): |
525 if val is None or val is False: |
526 return '0' |
526 return '0' |
527 if val == True: |
527 if val is True: |
528 return '1' |
528 return '1' |
529 return str(val) |
529 return str(val) |
530 oldenv = {} |
530 oldenv = {} |
531 for k in environ: |
531 for k in environ: |
532 oldenv[k] = os.environ.get(k) |
532 oldenv[k] = os.environ.get(k) |