From 5236ca0c449120125fd1311274b8e996bb9e462f Mon Sep 17 00:00:00 2001 From: Manuel Ebert Date: Mon, 4 Mar 2013 14:43:55 -0800 Subject: [PATCH] Compatibility with parsedatetime 1.x --- jrnl/Journal.py | 5 ++--- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/jrnl/Journal.py b/jrnl/Journal.py index 31f45ec0..8536c120 100644 --- a/jrnl/Journal.py +++ b/jrnl/Journal.py @@ -4,7 +4,6 @@ from Entry import Entry import os import parsedatetime.parsedatetime as pdt -import parsedatetime.parsedatetime_consts as pdc import re from datetime import datetime import time @@ -15,7 +14,7 @@ import readline, glob try: from Crypto.Cipher import AES from Crypto.Random import random, atfork -except ImportError: +except ImportError: pass import hashlib import getpass @@ -40,7 +39,7 @@ class Journal: self.config.update(kwargs) # Set up date parser - consts = pdc.Constants() + consts = pdt.Constants() consts.DOWParseStyle = -1 # "Monday" will be either today or the last Monday self.dateparse = pdt.Calendar(consts) self.key = None # used to decrypt and encrypt the journal diff --git a/requirements.txt b/requirements.txt index 04cd8ad4..9b78f344 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ clint >= 0.3.1 -parsedatetime >= 0.8.7 +parsedatetime == 1.1.2