diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 4174a0c..ce5d882 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -13,16 +13,25 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [2.7, 3.4, 3.5, 3.6, 3.7, 3.8] + python-version: ['2.7', '3.x'] steps: - uses: actions/checkout@v2 with: fetch-depth: 0 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + if: matrix.python-version != '2.7' + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - name: Set up Python 2 + if: matrix.python-version == '2.7' + run: | + sudo rm -f $(which python) $(which pip) + sudo apt-get install python2.7-dev + curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py + python2.7 get-pip.py + sudo ln -sf "$(which python2.7)" "$(dirname $(which python2.7))/python" - name: Install dependencies run: | pip install -U pip setuptools wheel diff --git a/autotime/__init__.py b/autotime/__init__.py index 09798bf..dd87be9 100644 --- a/autotime/__init__.py +++ b/autotime/__init__.py @@ -27,11 +27,11 @@ class LineWatcher(object): """ __slots__ = ['start_time', 'timestamp'] - def start(self): + def start(self, *args, **kwargs): self.timestamp = localtime() self.start_time = monotonic() - def stop(self): + def stop(self, *args, **kwargs): delta = monotonic() - self.start_time print( u'time: {} (started: {})'.format(