Changeset 500 for CMT/HEAD


Ignore:
Timestamp:
May 5, 2009, 12:24:23 PM (15 years ago)
Author:
rybkin
Message:

See C.L. 395

Location:
CMT/HEAD
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r499 r500  
     12009-05-05    <rybkin@lal.in2p3.fr> 395
     2       
     3        * mgr/cmt_svn_checkout.py: Improve error messages (string representation
     4        of SubversionException is simply a tuple)
     5       
    162009-05-04    <rybkin@lal.in2p3.fr> 394
    27       
  • CMT/HEAD/mgr/cmt_svn_checkout.py

    r498 r500  
    3838    from svn import client, core
    3939except ImportError, e:
    40     print >>sys.stderr, '%s: %s: cannot import Subversion Python bindings' \
     40    print >>sys.stderr, '%s: cannot import Subversion Python bindings: %s' \
    4141          % (self, str(e))
    4242    sys.exit(1)
     
    8282        pass
    8383
     84def error(instance, location='', file = sys.stderr):
     85    try:
     86        message = ': '.join([str(arg) for arg in instance.args])
     87    except AttributeError:
     88        message = instance
     89    if location: location += ': '
     90    print >> file, "%s%s" % (location, message)
     91   
    8492class CmtContext(object):
    8593    def __init__(self,
     
    243251                    m.version = rev_tag[max(rev_tag.keys())]
    244252                except core.SubversionException, e:
    245                     print >> sys.stderr, e
     253                    error(e)
     254                    #print >> sys.stderr, e
    246255                    m.version = 'HEAD'
    247256                except ValueError, e: # max() arg is an empty sequence
     
    301310            if not done:
    302311                for e in err:
    303                     print >> sys.stderr, e
     312                    error(e)
     313                    #print >> sys.stderr, e
    304314                    sc += 1
    305315                continue
Note: See TracChangeset for help on using the changeset viewer.