raise RuntimeError to support Python 3
This commit is contained in:
		
							parent
							
								
									ae90c64885
								
							
						
					
					
						commit
						c01e862bc2
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1,6 +1,7 @@
 | 
			
		|||
FOLDER = '1J_Yw3ENBfDOEjiPV2LpYIa86aAPnaVx3'
 | 
			
		||||
 | 
			
		||||
import os
 | 
			
		||||
import shlex
 | 
			
		||||
from pydrive.auth import GoogleAuth
 | 
			
		||||
from pydrive.drive import GoogleDrive
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -18,4 +19,4 @@ for file1 in file_list:
 | 
			
		|||
    if not os.path.exists(local_filename):
 | 
			
		||||
        file1.GetContentFile(local_filename)
 | 
			
		||||
    else:
 | 
			
		||||
        raise "{} exists".format(local_filename)
 | 
			
		||||
        raise RuntimeError("{} exists".format(shlex.quote(local_filename)))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue