From 292ab6bd409e77c29b28bb0320edff995ce17c33 Mon Sep 17 00:00:00 2001 From: Albert Cervera i Areny Date: Tue, 4 Sep 2018 00:31:18 +0200 Subject: [PATCH] Migrate to python 3 --- setup.py | 4 ++-- shop.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 9fdbf33..cef762c 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup import re import os -import ConfigParser +import configparser MODULE = 'sale_shop_trade_info' PREFIX = 'nantic' @@ -14,7 +14,7 @@ MODULE2PREFIX = {} def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -config = ConfigParser.ConfigParser() +config = configparser.ConfigParser() config.readfp(open('tryton.cfg')) info = dict(config.items('tryton')) for key in ('depends', 'extras_depend', 'xml'): diff --git a/shop.py b/shop.py index 7fc9e9e..79318cd 100644 --- a/shop.py +++ b/shop.py @@ -5,10 +5,9 @@ from trytond.model import fields from trytond.pool import PoolMeta __all__ = ['Shop'] -__metaclass__ = PoolMeta -class Shop: +class Shop(metaclass=PoolMeta): __name__ = 'sale.shop' logo = fields.Binary('Logo')