Changeset 871

Show
Ignore:
Timestamp:
06/10/07 06:14:01 (2 years ago)
Author:
lilo_booter
Message:

+ 'Corrections' for os/x and file system methods (utf8 unsupported in the comms for now)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/jahtools/jbatch/jbatch_server.py

    r870 r871  
    365365                                except Exception: 
    366366                                        # TODO: utf8 handling 
    367                                         print "rejecting", entry 
     367                                        #print "rejecting", entry 
     368                                        pass 
    368369                args[ "socket" ].sendall( result ) 
    369370 
     
    376377                        contents = os.listdir( dir ) 
    377378                        for entry in contents: 
    378                                 full = os.path.join( dir, entry ) 
    379                                 if os.path.isdir( full ): 
    380                                         socket.sendall( "\"%s/\"\n" % entry ) 
    381                                 elif files: 
    382                                         socket.sendall( "\"%s\"\n" % entry ) 
     379                                try: 
     380                                        full = os.path.join( dir, str( entry ) ) 
     381                                        if os.path.isdir( full ): 
     382                                                socket.sendall( "\"%s/\"\n" % entry ) 
     383                                        elif files: 
     384                                                socket.sendall( "\"%s\"\n" % entry ) 
     385                                except Exception: 
     386                                        #print "rejecting", entry 
     387                                        pass 
    383388                        socket.sendall( "\n" ) 
    384389                        if depth != 0: 
    385390                                depth -= 1 
    386391                                for entry in contents: 
    387                                         full = os.path.join( dir, entry ) 
    388                                         if os.path.isdir( full ): 
    389                                                 self.rpn.push( full ) 
    390                                                 self.rpn.push( depth ) 
    391                                                 self.rls( files, **args ) 
     392                                        try: 
     393                                                full = os.path.join( dir, str( entry ) ) 
     394                                                if os.path.isdir( full ): 
     395                                                        self.rpn.push( full ) 
     396                                                        self.rpn.push( str( depth ) ) 
     397                                                        self.rls( files, **args ) 
     398                                        except Exception: 
     399                                                #print "rejecting", entry 
     400                                                pass 
    392401                else: 
    393402                        socket.sendall( "\n" ) 
     
    397406 
    398407        def tree( self, **args ): 
    399                 self.rls( False, args ) 
     408                self.rls( False, **args ) 
    400409 
    401410        def help( self, **args ):