Replace unicode() with six.u()
six.u(text) A fake unicode literal. text should always be a normal string literal. In Python 2, u() returns unicode, and in Python 3, a string. Partial Implement: blueprint py33-support Change-Id: I02849e540c1fbb1f8b02bcbfa4d9be4f60279926
This commit is contained in:
		| @@ -35,7 +35,7 @@ def _get_opt_path(simple_params=[], **kwargs): | |||||||
|  |  | ||||||
| class User(base.Resource): | class User(base.Resource): | ||||||
|     def __init__(self, manager, info, loaded=False): |     def __init__(self, manager, info, loaded=False): | ||||||
|         _d = {unicode('user_id'): info} |         _d = {six.u('user_id'): info} | ||||||
|         super(User, self).__init__(manager, _d, loaded) |         super(User, self).__init__(manager, _d, loaded) | ||||||
|  |  | ||||||
|     def __repr__(self): |     def __repr__(self): | ||||||
| @@ -59,7 +59,7 @@ class UserManager(base.Manager): | |||||||
|  |  | ||||||
| class Project(base.Resource): | class Project(base.Resource): | ||||||
|     def __init__(self, manager, info, loaded=False): |     def __init__(self, manager, info, loaded=False): | ||||||
|         _d = {unicode('project_id'): info} |         _d = {six.u('project_id'): info} | ||||||
|         super(Project, self).__init__(manager, _d, loaded) |         super(Project, self).__init__(manager, _d, loaded) | ||||||
|  |  | ||||||
|     def __repr__(self): |     def __repr__(self): | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kui Shi
					Kui Shi