Misc. cleanup for Python 3
This commit is contained in:
parent
189bc1faa8
commit
ee35cc6f22
24 changed files with 49 additions and 36 deletions
|
@ -551,7 +551,7 @@ class ProductsView(MasterView):
|
|||
if product and (not product.deleted or self.request.has_perm('products.view_deleted')):
|
||||
data = {
|
||||
'uuid': product.uuid,
|
||||
'upc': unicode(product.upc),
|
||||
'upc': six.text_type(product.upc),
|
||||
'upc_pretty': product.upc.pretty(),
|
||||
'full_description': product.full_description,
|
||||
'image_url': pod.get_image_url(self.rattail_config, product.upc),
|
||||
|
@ -770,8 +770,8 @@ def print_labels(request):
|
|||
|
||||
try:
|
||||
printer.print_labels([(product, quantity, {})])
|
||||
except Exception, error:
|
||||
return {'error': str(error)}
|
||||
except Exception as error:
|
||||
return {'error': six.text_type(error)}
|
||||
return {}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue