From 0531935967fd784f762215d35bcae90194e0ff90 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Sat, 8 Aug 2015 19:38:11 +0200 Subject: [PATCH 1/1] backends: Move TaskWarriorException into backends --- tasklib/backends.py | 4 ++++ tasklib/task.py | 6 +----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tasklib/backends.py b/tasklib/backends.py index e5562c6..f817d4f 100644 --- a/tasklib/backends.py +++ b/tasklib/backends.py @@ -44,6 +44,10 @@ class Backend(object): pass +class TaskWarriorException(Exception): + pass + + class TaskWarrior(object): def __init__(self, data_location=None, create=True, taskrc_location='~/.taskrc'): self.taskrc_location = os.path.expanduser(taskrc_location) diff --git a/tasklib/task.py b/tasklib/task.py index d4fc9b2..4f10b9d 100644 --- a/tasklib/task.py +++ b/tasklib/task.py @@ -9,7 +9,7 @@ import six import sys import tzlocal -from backends import TaskWarrior +from backends import TaskWarrior, TaskWarriorException DATE_FORMAT = '%Y%m%dT%H%M%SZ' DATE_FORMAT_CALC = '%Y-%m-%dT%H:%M:%S' @@ -21,10 +21,6 @@ logger = logging.getLogger(__name__) local_zone = tzlocal.get_localzone() -class TaskWarriorException(Exception): - pass - - class ReadOnlyDictView(object): """ Provides simplified read-only view upon dict object. -- 2.39.5