mirror of
				https://github.com/psycopg/psycopg2.git
				synced 2025-10-31 07:47:30 +03:00 
			
		
		
		
	Improved error message on connect when kwargs are passed together with dns
This commit is contained in:
		
							parent
							
								
									32fae728b3
								
							
						
					
					
						commit
						bc68b2ff1e
					
				|  | @ -165,9 +165,8 @@ def connect(dsn=None, | |||
| 
 | ||||
|     if dsn is not None and items: | ||||
|         raise InterfaceError( | ||||
|             "you cannot specify keyword arguments (%s)" | ||||
|             " together with a connection string" | ||||
|             % ", ".join([k for k, v in items])) | ||||
|             "'%s' is an invalid keyword argument when the dsn is specified" | ||||
|                 % items[0][0]) | ||||
| 
 | ||||
|     if dsn is None: | ||||
|         if not items: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user