Changeset 26

Show
Ignore:
Timestamp:
2008年07月29日 23时36分46秒 (4 years ago)
Author:
jiangx
Message:

See #6: os.popen: must use str not unicode as argument

Location:
trunk/pysvnmanager
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/pysvnmanager/lib/base.py

    r24 r26  
    2727        msg = unicode(msg, 'utf-8') 
    2828    if escape and isinstance(msg, basestring): 
    29         msg = msg.encode('unicode_internal') 
     29        msg = msg.encode('raw_unicode_escape') 
    3030    return msg 
    3131 
     
    3434        msg = msg.encode('utf-8') 
    3535    if escape and isinstance(msg, basestring): 
    36         msg = msg.encode('unicode_internal') 
     36        msg = repr(msg)[1:-1] 
    3737    return msg 
    3838 
  • trunk/pysvnmanager/model/rcsbackup.py

    r25 r26  
    4040        comment = "no message." 
    4141     
     42    wcfile = get_utf8(wcfile) 
    4243    comment = get_utf8(comment) 
    4344    user = get_utf8(user, escape=True) 
     
    5455    for i in cmd: 
    5556        log.debug("Command: "+i) 
     57        continue 
    5658        try: 
    5759            buff = os.popen(i).read().strip()