File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ Clone the repository:
8787
8888- `$ git clone https://github.com/modzy/sdk-python.git`
8989
90- Setup a virtual environment from the local git directory (NOTE: Requires Python >= 3.8) :
90+ Setup a virtual environment from the local git directory:
9191
9292- `$ conda create --name VIRTUAL_ENVIRON_NAME --file requirements_dev.txt -c conda-forge python=3.9`
9393or for non-conda python distros:
Original file line number Diff line number Diff line change 2020
2121[ ![ installation] ( https://github.com/modzy/sdk-python/raw/main/install.gif )] ( https://asciinema.org/a/0lHaPxvXTrPTp1Bb6bNea1ZCG ) 
2222
23- Use the package manager [ pip] ( https://pip.pypa.io/en/stable/ )  to install the SDK (NOTE: Requires Python >= 3.8) :
23+ Use the package manager [ pip] ( https://pip.pypa.io/en/stable/ )  to install the SDK:
2424
2525-  ` $ pip install modzy-sdk ` 
2626
Original file line number Diff line number Diff line change @@ -51,12 +51,16 @@ def file_to_chunks(file_like, chunk_size):
5151    if  hasattr (file , 'seekable' ) and  file .seekable ():
5252        file .seek (0 )
5353
54-     while  chunk  :=  file .read (chunk_size ):
55-         if  not  isinstance (chunk , bytes ):
54+     while  True :
55+         chunk  =  file .read (chunk_size )
56+         if  not  chunk :
57+             break 
58+         elif  not  isinstance (chunk , bytes ):
5659            raise  TypeError ("the file object's 'read' function must return bytes not {}; " 
5760                            "files should be opened using binary mode 'rb'" 
5861                            .format (type (chunk ).__name__ ))
59-         yield  chunk 
62+         else :
63+             yield  chunk 
6064
6165    if  should_close :
6266        file .close ()
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments